Why market order get cancelled with reason "out of execution range"

smir99
If order type is "market order" then why it got cancelled with reason it is outside execution range ?
  • parikh
    Hi Guys @sujith @HowUTrade ,

    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
  • themohammedfaisal
    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.
  • parikh
    @themohammedfaisal Thanks for the detailed reply.

    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.
  • sujith
    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.
  • parikh
    Thanks for the response. If I want to test my code against these kind of order updates, how to do this ?
    Is there anyway this can be simulated ?
  • rakeshr
    No, currently we don't have a sandbox environment. You will have to place real order to check these order updates.
Sign In or Register to comment.