Bracket Order status

Hi @Dhan @Hardik

dhan.get_order_list() gives order with status

|orderStatus|enum string|Last updated status of the order
TRANSIT PENDING REJECTED CANCELLED TRADED EXPIRED|
| — | — |

Can you please let me know how to retrieve/filter the Bracket order which are TRADED but

  1. Still not Success
  2. which are Success

As I want to cancel the order which are in RUNNING state.

Thanks,
Mukesh

Hello @MukeshM

Once the entry leg is executed successfully, then 2 orders are created, one for Target and another one for Stop Loss. The status for these orders will be PENDING until executed.

Do note that both these orders will have different Order ID.

1 Like

Hi @Hardik

Thanks for the reply.

Can you please let me know how we can find the relationship between the original order id and the two new orders created due to basket order.

As I want to identify these two orders which were created due to Basket order and cancel then.
Also, want to identify the original order.

Thanks,
Mukesh

Hello @MukeshM

I am assuming you are talking about Bracket Order. Once a bracket order is executed, then the two legs created do not have a relation with the main order entry leg. Hence, there is no mapping maintained in the system.

When you place BO order, you will get order ID for the entry order as response. You can fetch this Order ID details and keep track of whether it is executed or not. Post this execution, there will be two different orders created in your account, which you can get using Order List, of same instrument. This orders will be OCO on our end i.e. if either one of this is executed, then the other one is cancelled. If you cancel any one of this, then the other one will be automatically executed, and your position will be closed.

Thanks @Hardik for your reply