When entry part of bracket order is executed, there are 2 open orders: a limit and a stoploss order. Both have order_id and parent_order_id. Do I need to call "DELETE" for both of the orders to exit the bo?
Yes, in this example the parent_order_id is passed only once. But, when I retrieve all pending orders, 2 open orders will come for every bracket order. Will it create any problem if I place DELETE order twice for these 2 orders?
Hi, Users can't cancel both orders. A user can only exit bracket order. There is no cancel order API for bracket order. All bracket orders are intraday orders. One has to close position by end of the day.
According to the docs, "cancelling" regular order and "exiting" bo are done using same "DELETE" operation. But calling "DELETE" on bo (for both second leg orders) giving me "400" error. My question is two fold. Why is 400 error ?and Do I just call "DELETE" for any one of the second leg orders?
Check out example for bracket order exit here.
Users don't have to cancel the second leg orders. We take care of exit.
One order is converted to execute at market and another is canceled.
Users can't cancel both orders. A user can only exit bracket order. There is no cancel order API for bracket order. All bracket orders are intraday orders. One has to close position by end of the day.