Error after sending an order

EQ2022
Hi,

Sometimes I am getting following error after sending an order, and order placement fails. :
ERROR - HTTPSConnectionPool(host='api.kite.trade', port=443): Max retries exceeded with url: /orders/regular/220405000456393 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
Could you please tell me if this is caused at my end or at Zerodha's?
  • rakeshr
    Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
    Is it happening for all the API request or specific for order placement?
    If for all requests, then it can be because of DNS Server. This article might help.
  • EQ2022
    This is happening only for order placement. It doesn't happen everyday. I place about 100-150 orders a day (not crossing any per second limits etc). This happens with 1-2 orders every now and then.
  • sujith
    It is very difficult to pin point the issue where this is happening. It can happen because of many reasons, it could be the client's connection with Kite trade, Kite trade's cloud connection to OMS data center or OMS overload, or OMS internal system connection issue.

    You need to catch the exception and retry after sometime. But you will have to be careful while retrying a POST or PUT request. For example, if you are facing this issue while placing order, then i would suggest catch the exception and add delay, post that check orderbook before making the request again.
  • EQ2022
    Ok, that makes sense. Should 10 seconds delay work, or should I wait more?
Sign In or Register to comment.