jugaad-data icon indicating copy to clipboard operation
jugaad-data copied to clipboard

NSE Option chain URI not working often

Open ronaldpaul opened this issue 3 years ago • 2 comments

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

ronaldpaul avatar Jan 13 '22 05:01 ronaldpaul

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 avatar Jan 14 '22 12:01 ronaldpaul

@ronaldpaul Thanks for pointing out, jugaad-data is only as reliable as the website.

sevakram avatar Feb 09 '22 15:02 sevakram