Support for retry in case of network exception

kbsbng
I am using the Java SDK, and one of my placeOrder calls failed with NetworkException. But, strangely, I find that the call has actually succeeded at the kite end, and created an order with the exchange. I had handled NetworkException in my code, with retry, and that resulted in duplicate order getting placed.

It would be good if you can accept an id in your place order calls, and if client retries an order that has succeeded at your end, respond back with the your orderId, instead of creating another order with the exchange. That would help to handle these kinds of NetworkException scenarios.
  • kbsbng
    @rakeshr / @sujith , Can you please help here?
  • sujith
    This might happen when Kite Trade doesn't get any confirmation from OMS.
    I would suggest checking orderbook before you retry placing order.
  • kbsbng
    Checking the orderbook would be ineffecient, since

    1) It that would get the entire orderbook, and
    2) would also consume another API call within the 5 order calls per second limit.
  • sujith
    Kite Connect doesn't handle this scenario. It has to be handled at the client application level. We all do it in our client-side applications.
Sign In or Register to comment.