Open-source project
VarunS2002/Python-NSE-Option-Chain-Analyzer avatar
VarunS2002/Python-NSE-Option-Chain-Analyzer

Python-NSE-Option-Chain-Analyzer: the NSE option chain in a desktop window

The NSE has a website which displays the option chain in near real-time. This program retrieves this data from the NSE site and then generates useful analysis of the Option Chain for the specified Index or Stock. It also continuously refreshes the Option Chain and visually displays the trend in various indicators useful for Technical Analysis.

668 stars269 forksPythonGPL-3.0

At a glance

What is it?
Python-NSE-Option-Chain-Analyzer pulls the option chain that the NSE publishes for Indian index and stock options, refreshes it on a timer, and turns it into a table of indicators with colour coded trends and Windows toast notifications. It ships as a Windows executable or as a single Python file, and it is explicitly an unofficial enthusiast tool rather than an exchange product.
Who is it for?
Adopt Python-NSE-Option-Chain-Analyzer if you trade NSE index or stock options and want a continuously refreshed option chain with indicator trends, change notifications and CSV export without building the scraper yourself. Skip it if you need a licensed data feed, since the program reads the public NSE website and is not affiliated with the exchange, or if you are on a platform without a Tk interface, since the extra Linux setup step is python3-tk.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 154 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Turning the NSE website into a live options table

The premise is specific. The National Stock Exchange has a website which displays the option chain in near real-time, and this program retrieves that data from the NSE site and generates analysis of the option chain for a specified index or stock. It also continuously refreshes the option chain and visually displays the trend in various indicators useful for technical analysis.

The stated audience is option traders, for whom the README says the option chain is the most important tool for deciding entry and exit strategies. That framing matters, because the program is not a general market dashboard. It is one screen, one instrument, one expiry and one strike price at a time, refreshed.

The data source is the public option chain page at nseindia.com/option-chain, and the underlying and derivative list comes from the NSE equity derivatives list. The calculations are based on a course by Sameer Dharaskar, whose name the README credits, and the project topics include the author's names as well as option-chain, strike-price, derivatives, equity, nifty, nse and web-scrapping.

The scraping approach is also the project's main constraint. Because the data comes from a website rather than a feed, the program is at the mercy of that page's structure and of the network path to it, and the notes section is candid about what happens when either misbehaves.

The disclaimer is part of the documentation

The README carries a disclaimer block with four separate statements, and for a project in this space that is not boilerplate.

The software is unofficial and is not affiliated with, endorsed or approved by the National Stock Exchange or by Sameer Dharaskar in any way. It is a purely enthusiast program intended for educational purposes only and is not financial advice. By downloading it, you acknowledge that you use it at your own risk and that the author is not responsible for any damages from its usage or installation. And all NSE names and symbols are owned by the National Stock Exchange.

The third point is the one that matters technically as well as legally. Scraping an exchange website and republishing its data is a different act from using an exchange feed, and the disclaimer is the project drawing that line explicitly. The logo handling in the notes section follows the same logic, since the load_nse_icon option exists so the program does not download the NSE icon in the .py version, which both avoids the branding issue and speeds up loading.

The licence is GPL-3.0, and the download badges point at the releases page, with the current version being v5.8.

An executable for Windows, or one Python file

There are two installation methods and the supported platforms are Windows, Linux and macOS.

Method 1 is Windows only. You download the .exe file and run it directly, which is the release artefact the README badges point at.

Method 2 is the source route, and it has a stated requirement of Python 3.6 or newer, plus additional steps on Linux, where you install `python3-tk` with `apt-get install python3-tk` and `python3-pip` with `apt install python3-pip`.

The python3-tk line is the giveaway about how the interface is built. The program is a desktop application with a table, colour coded cells, copy and paste and a settings file, which means it uses Tkinter, and on Debian and Ubuntu that is a separate package. For Windows and macOS, the README points at python.org for the interpreter.

You then download the .py file and install the missing modules with `pip install -r requirements.txt`.

The README notes that alternate implementations of Python and other installation methods may also be supported.

What you get is one program file. The repository top level holds NSE_Option_Chain_Analyzer.py, the nse_logo.ico and nse_logo.png, requirements.txt, the README, the CHANGELOG and the LICENSE. A single-file layout for a program of this scope is unusual, and it is the reason the distribution is a .py file and a compiled .exe rather than a package with an importable API.

Six steps from launch to a live table

The usage section is a numbered list, and it reads as a setup wizard for a single screen.

First you set Index Mode or Stock Mode. Then you select your index or stock. Then you select its expiry date. Then you enter your preferred strike price. Then you set the interval at which you want the program to refresh, which is optional and defaults to 1 minute. Then you click Start.

The order matters operationally. The expiry date and strike price are the two inputs that determine which slice of the option chain you are looking at, and the refresh interval is the setting that decides how much load you put on the NSE site, since every tick is a fresh fetch.

The title bar reflects the configuration, in the format NSE-Option-Chain-Analyzer - {index/stock} - {expiry_date} - {strike_price}, which is a useful detail when several instances are running.

Multiple instances are explicitly supported, with different indices or stocks and or strike prices selected, and each can be stopped and started manually from the option menu. That is the practical way to watch several expiries at once, and it is also why the per-instance configuration is worth understanding.

The notifications are where the analysis shows up

The feature list is long, but the toast notifications are the part that carries the analysis into the operating system, and the README enumerates exactly what is watched.

Notifications are for Windows 10 and 11 only. The changes that trigger one are Open Interest turning Bullish or Bearish, a change in value of the Open Interest Upper Boundary Strike Prices, a change in value of the Open Interest Lower Boundary Strike Prices, Call Exits becoming Yes or No, Put Exits becoming Yes or No, Call ITM becoming Yes or No, and Put ITM becoming Yes or No.

That list is a description of the indicator set. The upper and lower boundary strikes are the levels where open interest changes character, and the call and put flags capture exits and in-the-money status at the selected strike, so the program is watching the specific points a trader would look at rather than the whole chain.

Around that, the display is colour coded, with red and green indicating data based on trends, and the table itself can be selected wholesale with Ctrl+A or cell by cell, copied with Ctrl+C or the right click menu, and pasted into a spreadsheet, which the README says was tested with MS Excel and Google Sheets.

The timing behaviours are worth noting too. The program auto stops at 3:30pm when the market closes, and it alerts you if the last server update is 5 minutes or more old, which is the symptom of a stale feed.

Export, saved settings and the update check

The data leaves the program in several ways, and the README treats each one as a first-class feature.

You can export the table data to a .csv file, export data rows to .csv in real time as they arrive, and dump the entire option chain to a .csv file. A configuration file stores certain settings between runs, and the list is long enough to be worth reading: Load App Icon, Index/Stock Mode, Selected Index, Selected Stock, Refresh Interval, Live Export, Notifications, Dump entire Option Chain, Auto stop at 3:30pm, Warn Late Server Updates, Auto Check for Updates and Debug Logging.

Auto Check for Updates is on by default, which means the program contacts the project to see whether a newer version exists. There are also keyboard shortcuts for all options, and debug logging, which the notes section tells you to enable when you are reporting a problem, along with sending the NSE-OCA.log file or the console output.

The changelog is maintained in the repository as CHANGELOG.md, and the release history is version 5.8 on 2026-05-22, 5.7 on 2025-12-11 and 5.6 on 2024-10-16, each described as a bug fix update. The last push to the repository was on 2026-05-22, matching the newest release, and there is no separate homepage for the project.

What happens when the exchange site misbehaves

The requirements file is short and explains the shape of the program.

code
brotli>=1.1.0
pandas>=1.4.1,<=2.2.3
requests>=2.28.0
streamtologger>=2017.1
tksheet>=5.3.2,<=6.3.5
win10toast>=0.9; platform_system == "Windows" and platform_release == "10"

requests does the fetching, pandas does the table work, brotli handles compressed responses, tksheet writes the spreadsheets, streamtologger writes the log file, and win10toast produces the Windows notifications, with an environment marker that installs it only on Windows 10. The upper bounds on pandas and tksheet are pinned, which is a common sign of a program that has to keep working against a moving dependency.

The notes section describes the failure behaviour, and it is unusually specific. In case of network or connection errors the program does not crash and keeps retrying until manually stopped. If a ZeroDivisionError occurs or some data does not exist, the value of the variable defaults to 0. If there is an error fetching dates on the login screen, try refreshing, and if the error is on the main screen, stop and start again from the option menu. And if an Incorrect Strike Price message appears and the strike price is right, check whether the NSE website is loading the data properly before filing an issue.

The retry-forever behaviour is the one to keep in mind. It is the right behaviour for a trader watching a screen, and it is also why the late server update alert exists, because a silent retry loop and a dead feed look identical from the outside.

Editorial conclusion

Adopt Python-NSE-Option-Chain-Analyzer if you trade NSE index or stock options and want a continuously refreshed option chain with indicator trends, change notifications and CSV export without building the scraper yourself. Skip it if you need a licensed data feed, since the program reads the public NSE website and is not affiliated with the exchange, or if you are on a platform without a Tk interface, since the extra Linux setup step is python3-tk. Before you rely on it, read the disclaimer in the README, enable logging so you can attach the NSE-OCA.log file to any issue, and expect the program to keep retrying silently when the NSE site is unreachable. The last push was on 2026-05-22 and release 5.8 is the current version.

Frequently asked questions

How do I install Python-NSE-Option-Chain-Analyzer on Windows?

Use Method 1 and download the .exe file from the releases page, then run it directly. The source route needs Python 3.6 or newer, the .py file, and pip install -r requirements.txt, plus python3-tk on Linux.

Where does the option chain data come from?

The program retrieves it from the NSE site, with the option chain page at nseindia.com/option-chain as the data source and the NSE equity derivatives list for the supported indices and stocks. The README describes the program as unofficial and not affiliated with or endorsed by the National Stock Exchange.

What happens if the network fails while the program is running?

The README states that in case of network or connection errors the program does not crash and keeps retrying until it is manually stopped. It also alerts you if the last update from the server is 5 minutes or more old.

What can I export from Python-NSE-Option-Chain-Analyzer?

The table data can be exported to a .csv file, rows can be exported to .csv in real time, and the entire option chain can be dumped to a .csv file. You can also select and copy the table and paste it into a spreadsheet, which the README says was tested with MS Excel and Google Sheets.

Official sources

  1. Issues
  2. License: GPL-3.0
  3. README
  4. Releases
  5. VarunS2002/Python-NSE-Option-Chain-Analyzer on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/varuns2002-python-nse-option-chain-analyzer.svg)](https://hysenlabs.com/projects/varuns2002-python-nse-option-chain-analyzer)

Was this useful?