I read about this issue of Orders get cancelled by exchange and I would like to handle this in my program. I have couple of questions on it. 1. Does all kinds of Orders are cancelled ( Initial BUY/SELL orders and also Stoploss Limit/Market Orders also ?) 2. How to identify the whether the order is cancelled by exchange ? How does the status message looks like ? Anyone have a sample order status message in their logs, that you can post here ? 3. If anyone handling this scenario in their code, whats the most preferred and working solution ? a. Place Orders again after some time ? (like after one min untill the orders not getting cancelled ?) b. Any other suggestion/solution from Zerodha ?
Hi @parikh, 1. All Active orders can get cancelled(Market or Limit- Buy or Sell). Stoploss orders(passive) can get cancelled when triggered and become an active Limit or Market order if they are out of the execution range. 2. The status will be CANCELLED and status_message as below The order was cancelled by the exchange because the price is outside the current allowed execution range. [Read more.](https://zrd.sh/fo-execution-range) 3. Yes, its best you retry placing the same order or with small limit price variations after 30-60 seconds. Once the exchange's execution range is updated, it will go through.
Stoploss orders(passive) can get cancelled when triggered and become an active Limit or Market order if they are out of the execution range. --> I am unable to clearly undertsand your reply.
What are passive stoploss orders and active stoploss orders ( Once the stoploss order is in place then its always active from the user perspective and not sure with respect to the Zerodha system).
May be a scenario for your reply would make me understand clearly.
Just curious to know, whether you are answering on behalf of Zerodha or just as an another API user.
The exchange has two types of orderbook active and passive, active orderbook has only market and limit orders. The passive orderbook has stoploss and stoploss market orders. Once the trigger is hit, these orders either become limit order or market order.
The order is cancelled by exchange.
Check the below link to know more about this issue
https://support.zerodha.com/category/trading-and-markets/margin-leverage-and-product-and-order-types/articles/what-is-f-o-execution-range-and-why-do-some-open-orders-outside-f-o-execution-range-get-cancelled
https://zerodha.com/z-connect/queries/stock-and-fo-queries/deciphering-nses-execution-range-circular
@sujith ++
I read about this issue of Orders get cancelled by exchange and I would like to handle this in my program. I have couple of questions on it.
1. Does all kinds of Orders are cancelled ( Initial BUY/SELL orders and also Stoploss Limit/Market Orders also ?)
2. How to identify the whether the order is cancelled by exchange ? How does the status message looks like ?
Anyone have a sample order status message in their logs, that you can post here ?
3. If anyone handling this scenario in their code, whats the most preferred and working solution ?
a. Place Orders again after some time ? (like after one min untill the orders not getting cancelled ?)
b. Any other suggestion/solution from Zerodha ?
Best Regards,
Parikh
1. All Active orders can get cancelled(Market or Limit- Buy or Sell). Stoploss orders(passive) can get cancelled when triggered and become an active Limit or Market order if they are out of the execution range.
2. The status will be CANCELLED and status_message as below
The order was cancelled by the exchange because the price is outside the current allowed execution range. [Read more.](https://zrd.sh/fo-execution-range)
3. Yes, its best you retry placing the same order or with small limit price variations after 30-60 seconds. Once the exchange's execution range is updated, it will go through.
Stoploss orders(passive) can get cancelled when triggered and become an active Limit or Market order if they are out of the execution range. --> I am unable to clearly undertsand your reply.
What are passive stoploss orders and active stoploss orders ( Once the stoploss order is in place then its always active from the user perspective and not sure with respect to the Zerodha system).
May be a scenario for your reply would make me understand clearly.
Just curious to know, whether you are answering on behalf of Zerodha or just as an another API user.
The passive orderbook has stoploss and stoploss market orders. Once the trigger is hit, these orders either become limit order or market order.
Is there anyway this can be simulated ?