The other 2 files I programmatically extracted NIFTY and BANKNIFTY option securities by filtering out using segment=“NSE_FO” and asset_symbol and ordered in ascending order of expiry date but you see they are of futures only.
Please help find any other way to fetch FNO historical data. (NIFTY specifically)
@Ayush_48646255 Currently, expired instruments are not supported. However, the team is actively working on a dedicated API for this, and we will update this thread once it becomes available. Thanks
Thanks for your response buddy!; just another query–
I’m unable to exactly figure out which Nifty underlying index security (Its not clearly nifty50) should be considered for Nifty Weekly Options Expiry (call and put)
Find attached NIFTY securities I filtered out. Using its Instrument Key + Expiry + Strike + Call/Put we can find out historical security instrument and then using that we can request historical data.
Currently, I filtered this from the securities.json file-- using “segment”: “NSE_INDEX” programmatically [Link]
@Ayush_48646255 Could you please provide more details along with an example instrument key? Also, it seems the securities JSON file is not attached—could you share its contents?
Requirement:- Nifty Weekly Options Expiry index security
Issue:-
Every security in that file has instrument key field which is the identifier used to gets its derived securities, price and to trade.
To get option chain of Nifty50 we are trying to locate Nifty50 index security from the file but can’t clearly figureout as there is no exact Nifty50 anywhere.
@Ayush_48646255 Try generating a new access token — that should resolve the issue.
If you’re still encountering the same error, please share your code so I can take a closer look.
I am currently using the Upstox API to fetch historical candle data for various expired option instruments. However, I’ve noticed that for several instruments, the API is returning either an empty dataset or no data at all, despite using valid parameters and date ranges.
API Endpoint Used: https://api.upstox.com/v2/expired-instruments/historical-candle/NSE_FO|92348|24-04-2025/30minute/2025-04-24/2025-03-10
This issue seems to be affecting multiple similar option instruments, not just this one.
Could you please investigate and confirm whether the data for these instruments is available? If not, is there any limitation or delay in making expired instrument data available through the API?
Your assistance is appreciated, and I look forward to your response.
@Ayush_48646255 Could you please share the cURL request for the API that’s returning the error? I checked the Drive link you shared, but it only contains .exe and .json files—no code files were found.
Hi @Ayush_48646255
To access the option chain API, please ensure you are utilizing tokens from active applications rather than sandbox applications, as this functionality is unavailable in sandbox mode. Additionally, for security purposes, refrain from posting access tokens in public community forums.
Your active access token expires daily at 3:30 AM, requiring you to create a new one each day. Please do not post access tokens in the community forum, even when seeking support for debugging
@rahul Thank you for bringing this to our attention. We’ve identified the issue, and the team is currently working on backfilling the missing data. I’ll update this thread once the process is complete.
@Ayush_48646255 It looks like the expiry_date parameter is missing in your Option Chain API request. Also please ensure you’re also passing the correct instrument_key for the underlying symbol.
You can refer to the API documentation here, and check out a sample request here for reference.