"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 orderstatus changes to open when it is triggered or partially filled by the exchange. Therefore, when I cancel an SL order, I expect the orderstatus to update to cancelled.

    However, in the past couple of weeks, I encountered three instances where the Individual Order Status API initially returned open even after I had canceled the SL order. Shortly after, the status changed to cancelled.

    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 to cancelled. The open status 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?"

1 out of 1