OptionChain giving empty response

I am getting empty data in success response. i want to know the reason of it. is it because of not active F&O segment in my account?
{“status”:“success”,“data”:}

may be date and expiry placed wrong

Glad to hear the problem’s fixed for you, @Davinci_Code and @sagar_gajera . If any similar issues arise in the future, sending a curl request would aid in troubleshooting and processing.

I am also facing this same issue, it is continously giving response like this,
{
“status”: “success”,
“data”:
}

Could you please provide the instrument_key and expiry_date for which you are receiving an empty response? This will help us investigate further.

Thank you.

{
instrument_key: ‘NSE_INDEX|Nifty 50’,
expiry_date: ‘2024-06-28’,
};

Thank you for your response.
I tried almost all dates but still it is not happening.

Nifty contracts expire on Thursdays, and July 28th is a Friday. When we reset the date to July 27th, which is a Thursday, the results are as expected.

Have a look at this example code

curl --location 'https://api.upstox.com/v2/option/contract?instrument_key=NSE_INDEX%7CNifty%2050&expiry_date=2024-06-27' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'

For more details on expires of contracts please refer nseindia.com

Thank you.

1 Like

Ohh okay, I am sorry.
Thank you very much for your help.