Cancelled or failed orders are automatically retried by Zerodha


We’re using Zerodha Kite APIs to place orders. And when we placed NIFTY 20950 CE and NIFTY 20950 PE sell orders on 13th Dec at 09:31:01 AM, our orders were rejected due to an error as mentioned below:

“API was unable to communicate with the OMS or too many calls”

This is the message we received in API response and status received was “Failed”. So, we did not place any SL orders against these order.
But after 6-7 seconds, Zerodha placed those orders. In this case we did not know that those specific orders were re-tried and placed. So, it was confusing for us to identify the errors.

We experienced similar experience last week as well. When our SL orders did not go through at the mentioned price and got cancelled. But another SL order was executed after few seconds.
We want to understand, does it happen for all the failed or cancelled orders? How many times Zerodha tries to execute the orders? How do we know which order Zerodha has re-tried?

Because it’s easier to understand when you’re seeing the trades. But if you’re taking the trades using APIs, then there should be some mechanism or some documentation which explains this execution. So that same can be incorporated the coding as well.

Any help would be much apricated.
Thank you.
  • gautama
    @vikramavertatech did you ever find an answer to this question ? this looks so dangerous
  • sujith
    Kite Connect API doesn't retry placing orders. It could be the okhttp library doing the retry. I would suggest sending GUID for each order to avoid this.
  • sujith
    sujith edited January 2
    You can send param guid with alphanumeric value of length 12 while placing the order.
Sign In or Register to comment.