"orderstatus" to 'open' while cancelling an SL order (Intermittent behavior though)
-
"I am using Angel Broking's SmartAPI to check the status of my orders.
I typically place stop-loss (SL) orders, and my understanding is that an SL order's
orderstatuschanges toopenwhen it is triggered or partially filled by the exchange. Therefore, when I cancel an SL order, I expect theorderstatusto update tocancelled.However, in the past couple of weeks, I encountered three instances where the
Individual Order StatusAPI initially returnedopeneven after I had canceled the SL order. Shortly after, the status changed tocancelled.This behavior confused me, as it made it difficult to differentiate between an SL order being triggered and an SL order being canceled. While this has only happened a few times, it appears to be a pattern.
According to my communication with
smartapi@angelbroking.com, this is how the system is designed. However, I am unsure how to reliably handle cases where I cancel an SL order and expect the status to change tocancelled. Theopenstatus could indicate either that the SL order has been triggered or that it is in an intermediate state before being fully canceled.What would be the best approach to handle order responses in such scenarios?"