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/profile—dataPlan: Active) -
IP whitelisted: Yes (Primary + Secondary set, status
PRIMARY_MATCHconfirmed 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
dhanClientIdin body -
With / without
client-idheader -
exchangeSegmentas string ("NSE_EQ") and as integer (1) -
securityIdas string and integer -
Multiple stocks: HDFCBANK, RELIANCE, TCS, INFY
-
Date ranges from 1 week to 5 years
-
Official
dhanhqPython 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 |
|
GET /v2/orders, /v2/positions |
|
POST /v2/marketfeed/ltp |
|
POST /v2/charts/historical |
|
POST /v2/charts/intraday |
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:
-
Has anyone faced DH-905 like this — working plan, valid token, but charts always failing?
-
Did it resolve on its own, or did Dhan engineering need to manually fix something?
-
Is there any activation step beyond subscribing to the Data API plan that I might be missing?
-
Anyone know a direct Dhan engineering contact or an escalation path beyond the support ticket?
Thanks in advance. Will update this thread once resolved.
