Hi I place orders and there is range at which the orders can be executed in real time. I want to modify the stoploss only when the first leg of the BO is executed. Meaning I will need to change the trigger price for stoploss Can I do the same? Thanks -Hrushikesh
@RH1558 Yes You can Modify Trigger Price of Stoploss Order as well as Limit Price of Target Order. Note, Stoploss & Target Order will be placed by OMS only after your First leg Order status is COMPLETE. If first leg Order is OPEN, then no Sl & Tgt Order will be placed till 1st Leg Order Status changes to COMPLETE.
@RH1558 To Modify Sl or Tgt Order Send PUT Request https://api.kite.trade/orders/bo/[SL or TGT OrderId] / api_key / access_token / tradingsymbol / exchange / parent_order_id 'First Leg OrderId / price 'Only Required For Target Order Modification / trigger_price 'Only Required For SL Order Modification
Thanks Botany . Today I had sold BEL OCT FUT at 1286.85 (SL-1293.15 - difference of 6.3 points). But the order got executed at 1286.05 - and thereby automatically the stoploss changed to 1292.35- Resulting in a loss for me. So I now plan to modify the order once the parent order is complete, now in my case the difference in points will be 7.1 instead of 6.3 as the order execution happened lower than I wanted.
Would this work? Can I send a parameter trigger_price to change a executed BO with the parent order ID? Thanks
@RH1558 Normally , this happens in BO as Ist Leg Order may execute at any price due to fluctuations and SL & Tgt Prices calculated from Executed Price of 1st Leg. You can modify the SL price once the Order is placed by OMS.
Below is the Example Parent Order Id = 15897890001 Sl Order Id = 15897890002
Great, Thanks a ton Botany, btwn - the price parameter-which is mandatory, what should be its value? Should it be same as that of trigger price or more or zero? Sorry for the trouble and thanks and advance Regards -Rishi
Welcome...! You can Put 0 to Non Applicable Fields Like, in Sl Order Modification Put 0 for Quantity & LimitPrice vice-versa for Tgt Order Modification
I am getting the error : HTTP STATUS CODE500 MODIFY ORDER REPLY JSON : {"status": "error", "message": "An internal server error occurred", "error_type": "GeneralException"}
Can you please suggest what am I doing wrong Regards -Rishi
Hi @lazydragonfist, Please create a new thread for new queries. If someone else has the same issue/doubt then they can search and find the answer. If I answer here, it gets buried and unsearchable.
Yes You can Modify Trigger Price of Stoploss Order as well as Limit Price of Target Order.
Note, Stoploss & Target Order will be placed by OMS only after your First leg Order status is COMPLETE.
If first leg Order is OPEN, then no Sl & Tgt Order will be placed till 1st Leg Order Status changes to COMPLETE.
To Modify Sl or Tgt Order
Send PUT Request
https://api.kite.trade/orders/bo/[SL or TGT OrderId]
/ api_key
/ access_token
/ tradingsymbol
/ exchange
/ parent_order_id 'First Leg OrderId
/ price 'Only Required For Target Order Modification
/ trigger_price 'Only Required For SL Order Modification
So I now plan to modify the order once the parent order is complete, now in my case the difference in points will be 7.1 instead of 6.3 as the order execution happened lower than I wanted.
Would this work? Can I send a parameter trigger_price to change a executed BO with the parent order ID?
Thanks
Normally , this happens in BO as Ist Leg Order may execute at any price due to fluctuations
and SL & Tgt Prices calculated from Executed Price of 1st Leg.
You can modify the SL price once the Order is placed by OMS.
Below is the Example
Parent Order Id = 15897890001
Sl Order Id = 15897890002
--Request PUT --https://api.kite.trade/orders/bo/15897890002
/ api_key = xxx
/ access_token = xxx
/ tradingsymbol = BEL16OCTFUT
/ exchange = NSE
/ parent_order_id = 15897890001
/ trigger_price = 1293.15
Above request will modify your SL Trigger Price From 1292.35 to 1293.15
Sorry for the trouble and thanks and advance
Regards
-Rishi
You can Put 0 to Non Applicable Fields
Like, in Sl Order Modification Put 0 for Quantity & LimitPrice
vice-versa for Tgt Order Modification
Sorry to open the discussion again, & again seeking your help, I was busy and couldnt trade.
While modifying orders with the parameters
https://api.kite.trade/orders/bo/161108000058760?api_key=*********&access_token=*********&parent_order_id=161108000058758&quantity=0&price=0&trigger_price=1932.85
I am getting the error : HTTP STATUS CODE500 MODIFY ORDER REPLY JSON : {"status": "error", "message": "An internal server error occurred", "error_type": "GeneralException"}
Can you please suggest what am I doing wrong
Regards
-Rishi
You are missing two parameters
tradingsymbol
exchange
Add & Try
Will try again and inform back
Kind Regards
-Rishi
{'parent_order_id': u'171026001462580', 'product': 'NRML', 'order_type': 'LIMIT', 'exchange': 'NSE', 'access_token': u'klsjflkasdjf;laksjd;lfkasjd;flkasjl', 'price': 380, 'trailing_stoploss': '', 'stoploss_value': 0, 'validity': 'DAY', 'transaction_type': 'SELL', 'trigger_price': 0, 'order_id': u'171026001462632', 'tradingsymbol': 'SBIN', 'api_key': u'asdfasdfadsfsa', 'squareoff_value': 0, 'quantity': 1}
{"status": "success", "data": {"order_id": "171026001462632"}}
{'parent_order_id': u'171026001462580', 'product': 'NRML', 'order_type': 'LIMIT', 'exchange': 'NSE', 'access_token': u'klsjflkasdjf;laksjd;lfkasjd;flkasjl', 'price': 0, 'trailing_stoploss': '', 'stoploss_value': 0, 'validity': 'DAY', 'transaction_type': 'SELL', 'trigger_price': 245, 'order_id': u'171026001462633', 'tradingsymbol': 'SBIN', 'api_key': u'asdfasdfadsfsa', 'squareoff_value': 0, 'quantity': 1}
{"status": "success", "data": {"order_id": "171026001462633"}}
Please create a new thread for new queries.
If someone else has the same issue/doubt then they can search and find the answer.
If I answer here, it gets buried and unsearchable.