Romesh
January 30, 2026, 5:05am
1
Hi Dhan team,
When calling POST /v2/charts/rollingoption, expiryCode: 0 always returns 400:
{"errorType":"Input_Exception","errorCode":"DH-905","errorMessage":"expiryCode is required"}
But the same request works with expiryCode: 1. Earlier annexure showed 0=Near/Current, 1=Next, 2=Far.
Can you confirm:
Are valid values now 1/2/3 (instead of 0/1/2)?
Or is this a validation bug treating 0 as missing?
Thanks.
Hey @Romesh ,
We want to inform you that specifically for the API call related to expired option data, the expiry code works as 1, 2, and 3, where: 1 denotes near expiry, 2 denotes next expiry, and 3 denotes far expiry.
For all other API calls, please refer to the annexure for the applicable expiry codes Annexure - DhanHQ Ver 2.0 / API Document
Romesh
January 30, 2026, 6:42am
3
Thank You !
But document needs an Update