@Jignesh To exit all quantities for BO, you can cancel any one order either limit or stop loss order. If you exit limit order then limit is executed at market and corresponding stop loss order is cancelled. Your childOrders list can be populated by filtering orderbook with two conditions, 1. get orders with parentOrderId param, same as parent order id. 2. get all limit orders or get all stop loss orders and place cancel request for these orders.
Thanks @rakeshr . I am able to exit limit order in a loop for all order where status is "OPEN". The difference between cancel order and exit order is not clear, and whether to cancel or exit a order with status as OPEN or TRIGGER PENDING.
To exit all quantities for BO, you can cancel any one order either limit or stop loss order.
If you exit limit order then limit is executed at market and corresponding stop loss order is cancelled.
Your childOrders list can be populated by filtering orderbook with two conditions,
1. get orders with parentOrderId param, same as parent order id.
2. get all limit orders or get all stop loss orders and place cancel request for these orders.
I am able to exit limit order in a loop for all order where status is "OPEN".
The difference between cancel order and exit order is not clear, and whether to cancel or exit a order with status as OPEN or TRIGGER PENDING.