Option chain stock option data fetch issue

This is my end point:

API endpoint

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

Params:
params = {
“instrument_key”: “NSE_INDEX|Nifty Bank”, # Try index first
“expiry_date”: “2025-06-25”
}

When i fetch using “instrument_key”: “NSE_INDEX|Nifty Bank” or “instrument_key”: “NSE_INDEX|Nifty 50” then we get the data but when we use different instrument key like NSE_FO|50976 or NSE_FO|50975 (downloaded from upstox server: https://assets.upstox.com/market-quote/instruments/exchange/complete.csv.gz) then fetch data is empty.

Hi @CHIRANJIT_27473822, You can query the Option Chain using only the underlying_key (also referred to as asset_key ). This will return the full option chain, including all related instrument_key values such as NSE_FO|50975 , associated with that underlying.
There’s no need to query for each specific option symbol individually.

Thanks