Dhan Data API — DH-905 on /charts/historical despite active subscription — anyone else facing this?

Getting DH-905 Input_Exception on the historical and intraday chart endpoints for all stocks, all date ranges. Token is active, data plan active until Jun 30. Trading APIs, market feed, profile — all work fine. Only charts/historical and charts/intraday return DH-905. Tried official dhanhq SDK, raw HTTP, every payload variation from the docs — same error. Raised with Dhan support but no resolution yet. Has anyone faced this and found a fix?


Full Community Message


[Help] Dhan Data API — DH-905 on Historical & Intraday Charts Despite Active Plan

Hi everyone,

I’ve been stuck on this for a while and Dhan support hasn’t been able to resolve it. Posting here to see if anyone has faced something similar or has a workaround.


The Problem

Every call to POST /v2/charts/historical and POST /v2/charts/intraday returns:

{
  "errorType": "Input_Exception",
  "errorCode": "DH-905",
  "errorMessage": "Missing required fields, bad values for parameters etc."
}

This happens for every stock, every date range, every payload combination — including the exact sample payload from Dhan’s own documentation.


My Setup

  • Data API subscription: Active (until 30 Jun 2026, ₹499/month plan)

  • Access token: Active (confirmed via /v2/profiledataPlan: Active)

  • IP whitelisted: Yes (Primary + Secondary set, status PRIMARY_MATCH confirmed via /v2/ip/getIP)


Payload I’m sending (straight from Dhan docs):

POST https://api.dhan.co/v2/charts/historical

Headers:
  access-token: <JWT>
  client-id: <client_id>
  Content-Type: application/json

Body:
{
  "securityId": "1333",
  "exchangeSegment": "NSE_EQ",
  "instrument": "EQUITY",
  "oi": false,
  "fromDate": "2026-05-01",
  "toDate": "2026-06-16"
}


Everything I’ve already tried

  • With / without expiryCode

  • With / without dhanClientId in body

  • With / without client-id header

  • exchangeSegment as string ("NSE_EQ") and as integer (1)

  • securityId as string and integer

  • Multiple stocks: HDFCBANK, RELIANCE, TCS, INFY

  • Date ranges from 1 week to 5 years

  • Official dhanhq Python SDK v2.2.0

  • Raw Python urllib (no third party library)

  • Forced IPv4 vs IPv6

All return DH-905. Zero exceptions.


What works vs what doesn’t:

Endpoint Status
GET /v2/profile :white_check_mark: Works
GET /v2/orders, /v2/positions :white_check_mark: Works
POST /v2/marketfeed/ltp :white_check_mark: Reaches service (rate limited)
POST /v2/charts/historical :cross_mark: DH-905 every time
POST /v2/charts/intraday :cross_mark: DH-905 every time

The fact that market feed endpoints reach the service and return a rate limit response (not DH-905) tells me the token and account are fine — the charts service specifically is rejecting my account.


Dhan Support Response

Support confirmed the API is working on their end and shared the sample payload (same as what I was already sending). They asked me to verify my token is active — it is. No further resolution.


My Theory

This looks like a backend provisioning issue where the Dhan charts microservice hasn’t registered or synced my data plan subscription for my client ID, even though the profile API shows it as active. Could be a stale state or missing DB entry on their end.


Questions for the community:

  1. Has anyone faced DH-905 like this — working plan, valid token, but charts always failing?

  2. Did it resolve on its own, or did Dhan engineering need to manually fix something?

  3. Is there any activation step beyond subscribing to the Data API plan that I might be missing?

  4. Anyone know a direct Dhan engineering contact or an escalation path beyond the support ticket?

Thanks in advance. Will update this thread once resolved.

For reference, attaching the screenshot

Hi @Pratik_Jaswant

can you try below payload

{
  "securityId": "1333",
  "exchangeSegment": "NSE_EQ",
  "instrument": "EQUITY",
  "interval": "5",
  "fromDate": "2026-05-01",
  "toDate": "2026-06-16"
}

for

https://sandbox.dhan.co/v2/charts/intraday