☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.7K
All Categories
0
Incidents
144
Node JS client
38
Go client
786
.Net API client
375
Kite Publisher
537
.Net / VBA / Excel (3rd party)
452
Algorithms and Strategies
986
Java client
1.1K
API clients
402
PHP client
3.9K
Python client
343
Mobile and Desktop apps
1.3K
Market data (WebSockets)
3.3K
General
In this Discussion
June 24
chetanjadhav
June 25
sujith
GTT Order getting failed
chetanjadhav
June 21
edited June 21
in
Python client
# Replace these with your actual API key and API secret
from kiteconnect import KiteConnect
kite = KiteConnect(api_key="###############")
access_token = "####################"
orders = [
{
"transaction_type": KiteConnect.TRANSACTION_TYPE_SELL,
"quantity": 1,
"price": 124.00,
"order_type":KiteConnect.ORDER_TYPE_LIMIT,
"product":KiteConnect.PRODUCT_CNC,
}, {
"transaction_type": KiteConnect.TRANSACTION_TYPE_SELL,
"quantity": 1,
"price": 123.00,
"order_type":KiteConnect.ORDER_TYPE_LIMIT,
"product":KiteConnect.PRODUCT_CNC,
},
]
kite.set_access_token(access_token)
order_id = kite.place_gtt (
trigger_type=KiteConnect.GTT_TYPE_TWO_LEG,
exchange="NSE",
symbol="IDFC",
last_price=123.70,
orders=orders,
)
print ("--order_id--",order_id)
I am gettign this error
order_id = kite.place_gtt (
AttributeError: 'KiteConnect' object has no attribute 'place_gtt'
I don't see any documentation or sample code to how to place this order
Note : I want to place GTT order or a order with stoploss and targe
sujith
June 24
You can refer to the example
here
.
chetanjadhav
June 24
edited June 24
Hi Sujith, Thanks for the reply.
but the code you suggested is not working as per my expectation.
above two images are from kite web. I want to place orders like this
but the code you suggested are giving output like below
kindly please advice
order_want_to_place.png
37.7K
ajmera2.png
21.9K
suggest_by_you.png
28.6K
sujith
June 24
Placing GTT with an order is a feature exclusive to Kite web and app, you can use order updates via Websockets and place OCO GTT once an order gets filled or completed.
chetanjadhav
June 24
edited June 24
so you're saying we can not place an order through the code as per first image in this conversation
sujith
June 25
You can code it as mentioned above.
Sign In
or
Register
to comment.
but the code you suggested is not working as per my expectation.
above two images are from kite web. I want to place orders like this
but the code you suggested are giving output like below
kindly please advice