Optionchain data for both NSE, BSE indices - Download past 1 year data & live data into EXCEL file

Could you please help me, to download Optionchain data for both NSE, BSE indices?

  1. I wanted to Download the data for the past 1 year for study purposes.

  2. Also, how to download live optionchain data into EXCEL file.

Help appreciated.

Live data is easy. Just go to the option chain page of NSE or any broker, open dev tools, there will be a JSON request for the option chain. For example, Banknifty option chain from NSE can be found at:

https://www.nseindia.com/api/option-chain-indices?symbol=BANKNIFTY

Use python to get the JSON and convert it to CSV for viewing in excel. Cookies/tokens not required, but supply a user-agent header.

Historical data is a different beast. I don’t know if historical option chain data is sold by anyone. You can buy ohlc options data a use it to create option chains at any instant, which is what I did.

1 Like