☰
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
14K
All Categories
0
Incidents
157
Node JS client
40
Go client
794
.Net API client
383
Kite Publisher
537
.Net / VBA / Excel (3rd party)
462
Algorithms and Strategies
1K
Java client
1.1K
API clients
405
PHP client
4K
Python client
349
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.4K
General
In this Discussion
June 2024
Vishnuvardhan
June 2024
sujith
May I know how to handle OCO orders using python in Zerodha
Vishnuvardhan
June 2024
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 2024
You can use GTT for this. You can know more about it
here
and check out the example
here
.
Vishnuvardhan
June 2024
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 2024
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 2024
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 ?