Today, 5 November, I faced repeated Kite API errors shortly after market open, around 9:15:16–9:16:48 AM IST. I’ve noticed this happening repeatedly when NIFTY opens with a large gap up or down.
The errors included: - Order-placement requests returning an HTML “522: Connection timed out” page instead of JSON, causing JSON parsing errors. - Read timeouts while cancelling orders and fetching prices. - Multiple 522 responses between approximately 9:16:04 and 9:16:32 AM, affecting both equity and futures orders.
My client timeout is set to 0.4 seconds for cancellations and 0.8 seconds for price requests. These settings may explain some client-side timeouts, but I’d also like to understand the 522 responses.
Could you please check whether there was increased latency or an upstream connectivity issue during this period? Also, what is the recommended way to confirm an order’s status after a timeout or 522 response before retrying, to avoid placing a duplicate order?