Hi @sahilshah619
The Get Put Call Option Chain API allows you to retrieve the put/call option chain for an underlying symbol with a specified expiry date, as outlined in the documentation.
If you pass in symbols like “Nifty” or “BankNifty,” you’ll receive their respective option chains. However, “NSE_FO|82269” refers to a specific contract, not an underlying symbol with an option chain, so an empty response is returned. To obtain market details for option contracts, please use the Market Quote API or the Historical Data API.
Certainly, you can automate data extraction from the instruments file. Here’s a Python example using pandas, where I print all the instrument keys. There is no need for web scraper just use the url of the file to load data
import pandas as pd
# Load data
fileurl = 'https://assets.upstox.com/market-quote/instruments/exchange/complete.json.gz'
symboldf = pd.read_json(fileurl)
print(symboldf['instrument_key'])
You cannot pass time as a parameter to the API; however, the response includes the time, so you can filter the data on your end to match your custom time frame.