I am trying to fetch data for option chain the status is success but it does not show any data

The output comes out as follows:-

{'status': 'success', 'data': []}

The input is as follows:-

url = "https://api.upstox.com/v2/option/chain"

params={'instrument_key': "NSE_FO|37263",
        "expiry_date": "2024-02-15",}

headers = {
  'Accept': 'application/json',
  'Authorization':f'Bearer {token}'
}

payload={}
response = requests.get(url, headers=headers, data=payload, params=params)

print(response.json())

Help would be much appreciated.

I assume you are looking for the BHARATFORG option chain. Please use the following parameters for instrument_key and expiry_date.

params = {
    'instrument_key': "NSE_EQ|INE465A01025",
    'expiry_date': "2024-11-28",
}

Let me know if this helps!

1 Like