jugaad-data
jugaad-data copied to clipboard
NSE Option chain URI not working often
Issue description
Hi @sevakram , It looks like NSE India website API has issues and has very frequent downtime. It returns empty result set in the URI in which you are hitting to fetch the option chain. In the past few weeks, it has been a frustrating issue as the automation is failing by unable to fetch expiry date. Could you fetch the expiry dates from any other reliance source API please?
Thanks for your effort.
Example Code
n = NSELive()
option_chain = n.index_option_chain("NIFTY")
expiry = option_chain['records']['expiryDates'][00]
or
option_chain = n.stock_quote_fno("NIFTY")
expiry = option_chain['expiryDates'][0]
Error snippet
Error in fetching expiry date
Today also it failed with the same error.
Both URLs https://www.nseindia.com/api/option-chain-indices?symbol=NIFTY & https://www.nseindia.com/api/quote-derivative?symbol=NIFTY are returning empty results most of the time. Looks like these API URIs are not reliable anymore.
@ronaldpaul
Thanks for pointing out, jugaad-data
is only as reliable as the website.