Calling DELETE /v2/positions also cancel active Super Orders?

I’m developing with Dhan API. Currently, I’m calling DELETE /v2/positions to exit all positions. Does it also cancels associated Super Orders? Or I need to call DELETE /super/orders/{order-id}/{order-leg} again for each positions?

I’m using POST /super/orders to create new order.

Hi @Hirak ,

DELETE /v2/positions will exit all active positions and cancel open orders. For safety purposes, please cancel the Super Order and all its legs separately using DELETE /v2/super/orders/{order-id}/{order-leg}.

So, if you have active/pending Super Orders, check them and cancel them separately using DELETE /v2/super/orders/{order-id}/{order-leg}.

Can you please confirm from the team? The V2 docs says: Exit all active positions and cancel all open orders for the current trading day.

It says active position and orders, but does not include the Super Orders too or just order. Please confirm from Dhan API Dev team.

Hi @Hirak ,

Using the DELETE /v2/positions endpoint, all your open positions will be exited, regardless of whether they were created through a normal order or a Super Order.

However, any pending Target or Stop Loss legs placed as part of a Super Order that are still awaiting execution will not be cancelled through the Exit All Positions API.

These pending Super Order legs need to be cancelled separately using the Super Order Cancel API.

So, in case of active Super Orders, we recommend checking and cancelling the pending Target/Stop Loss legs separately after exiting all positions.

Got it. Cancelling the Super Order leg first, then closing the Position by triggering a reverse order.