How can I EXIT an active cover order (CO) through API for index options?

Hi,

I have tried placing a cover order for index options and it worked fine. But I am seeing no way to exit an active cover order through API call. If I place a sell order (either as INTRA or as CO), it is considered a separate unrelated order and creates a different sell position. Additionally, since we cannot fetch LTP for the option in DhanHQ, the method of modifying the trigger price close to the LTP is also not viable.

Please help if there is some way to exit a cover order (CO) through API.

Thanks,
DJ

Hi @Djain

To exit the position of Cover Order, cancel the pending Stop Loss order. Your position will automatically exit at Market Price.

Thanks for the quick reply Naman!

Quick question, will the order ID for stop loss order be the same as order ID given to the entry order?