Hi Dhan API Team,
My Data API plan is active (valid till 03-12-2026), and /v2/charts/historical works fine with my access token. But every request to POST /v2/charts/rollingoption (Expired Options Data) returns:
HTTP 400 – {“errorType”:”Input_Exception”,”errorCode”:”DH-905",”errorMessage”:”Missing required fields, bad values for parameters etc.”}
This happens even with the exact example payload from your documentation:
{“exchangeSegment”: “NSE_FNO”, “interval”: “1”, “securityId”: 13, “instrument”: “OPTIDX”, “expiryFlag”: “MONTH”, “expiryCode”: 1, “strike”: “ATM”, “drvOptionType”: “CALL”, “requiredData”: [“open”, “high”, “low”, “close”, “volume”], “fromDate”: “2024-07-01”, “toDate”: “2024-07-08”}
I also tried WEEK and MONTH, expiryCode 1, 2 and 3, and securityId as a number and as text. All give the same error.
Please:
- Enable Expired Options Data for my account, or tell me which field is wrong.
- Confirm if F&O segment activation is required for this API (my profile shows only the Equity segment active).
Client ID: 1114390380
