☰
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.8K
All Categories
0
Incidents
154
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
993
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
June 25
Vishnuvardhan
June 25
sujith
May I know how to handle OCO orders using python in Zerodha
Vishnuvardhan
June 22
in
Python client
Let's say i placed 2 orders Target and Stop Loss. If one order is executed, then other order should cancel automatically.
Is there any function available in Zerodha for this ?
If not, can you please tell, how to handle this ?
Tagged:
@rakeshr
sujith
June 24
You can use GTT for this. You can know more about it
here
and check out the example
here
.
Vishnuvardhan
June 25
Thanks
@sujith
Have one last doubt. in the below code, function is expecting Ltp of the trading symbol.
gtt_oco = kite.place_gtt(trigger_type=kite.GTT_TYPE_OCO, tradingsymbol="SBIN", exchange="NSE", trigger_values=[470,480], last_price=473, orders=order_oco)
Do I need to fetch externally using Ltp function and pass or is it optional parameter ?
sujith
June 25
LTP is a must field. It is used by the backend to determine the direction. You may use LTP method or Quote API or Websocket API.
Vishnuvardhan
June 25
Ok Thanks
This discussion has been closed.
Have one last doubt. in the below code, function is expecting Ltp of the trading symbol.
gtt_oco = kite.place_gtt(trigger_type=kite.GTT_TYPE_OCO, tradingsymbol="SBIN", exchange="NSE", trigger_values=[470,480], last_price=473, orders=order_oco)
Do I need to fetch externally using Ltp function and pass or is it optional parameter ?