/v2/charts/rollingoption: expiryCode=0 gives DH-905 (“expiryCode is required”) — mapping changed?

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:

  1. Are valid values now 1/2/3 (instead of 0/1/2)?

  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

Thank You !
But document needs an Update