API errors (502 / malformed JSON) on /v2/orders — Sep 2, 2026, 11:12–11:18 IST

Subject: API errors (502 / malformed JSON) on /v2/orders — Sep 2, 2026, 11:12–11:18 IST

Hi Dhan team,

Our intraday algo (running via the REST API, NSE_FNO segment) hit a sustained API problem today and I wanted to flag it and ask for confirmation on your end.

Window: 2026-09-02, approx. 11:12:30 to 11:18:21 IST (~6 minutes)

What we saw:

  1. GET /v2/orders started returning HTTP 502 with an HTML error page instead of JSON:
    “502 — <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”…”

  2. POST /v2/orders (new order placement) calls during the same window returned non-JSON response bodies, which our client correctly failed to parse:
    “requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)”
    This repeated on effectively every order-placement attempt from 11:12:31 through 11:18:18 IST.

  3. A positions fetch in the same window also came back empty/unusable (no valid “data” in the response).

  4. The first clean, valid response came at 11:18:21,940 IST, after which order placement worked normally again.

This lines up with the kind of upstream gateway issue you’ve acknowledged before (e.g. your Sep 2024 post about a disconnection from intermittent margin allocation at the exchange end cascading from BSE to NSE) — so I wanted to ask directly:

  • Was there a known API/gateway degradation on your end during this window today?
  • Was it isolated to order placement/order book endpoints, or broader?
  • Any RCA you can share (exchange-side vs. Dhan infra-side)?

Happy to share exact order IDs / client ID / full logs via a support ticket if that helps you trace it on your end — didn’t want to post account-identifying details here. This caused a real complication on our side (a stuck order-placement retry loop that succeeded the moment the API recovered), so an official confirmation of the outage would be genuinely useful for our own incident record.

Thanks.

Hello @Jose_Kiran ,

Thank you for sharing the details. We have checked the API status from our end for the mentioned time window, and everything appears to be working as expected.

We request you to kindly try placing an order and making the API call again today. You may also test the request through our Production API to verify the response here Intraday historical endpoint.

If you continue to receive the same error, please share a screenshot of the error along with the relevant details with us at apihelp@dhan.co