NSEPython is a Python library to get publicly available data on the current NSEIndia and NIFTY Indices site by communicating with their REST APIs.
Support and Beta Functions
- If you have other doubts or want to check out the beta functions, visit the NSEPython Discussions forum.
- If you have feature requests, you can submit them at the NSEPython Feature Request forum.
Versions
There are two versions of NSEPython depending on the execution environment. While it's technically feasible to combine these versions into a single program, doing so could introduce latency. Given the financial nature of this program, time is of the essence.
| NSEPython Edition | Compatibility | Tested Environments |
|---|---|---|
| Local Edition | Laptops (Windows 11, 10) | Windows 11, Windows 10 |
| Server Edition | Servers (AWS, Google Colab, DigitalOcean) | AWS, Google Colab, DigitalOcean |
Installation
Use the package manager pip to install nsepython.
NSEPython Local Edition
Access NSEPython for laptops, specifically tailored for Windows 11 and Windows 10 compatibility.
pip install nsepython
NSEPython Server Edition
Leverage NSEPython designed for server environments, seamlessly functioning on AWS, Google Colab, and DigitalOcean.
pip install nsepythonserver
Cross Library Migration
All the functions from the two renowned packages, NsepY and NSETools, have been migrated here with the same function names. Both of these packages had been left unmaintained for a considerable period.
Advanced Usecases
Mastering AlgoTrading: A Beginner's Guide using NSEPython
- Candlestick Charts in Python with NSEPython and Plotly
- Calculate any Option Greek using Black Scholes Formula in Python
- How to find the beta of Indian stocks using Python?
- How to get Historical PE, PB and Dividend Ratio of any index using Python
Designing an Index Fund From Scratch in Indian Share Market
- Building An Market-Weight Adjusted N50 Index Fund – Part I
- Building An Market-Weight Adjusted N50 Index Fund – Part II
- How to calculate NIFTY 50 value from the stock prices in Python
Coding Heatmap and ORB
- Creating Dynamic Heatmap for Indian Stock Market
- Coding Heatmap Opening Range Breakout Strategy in Python – Part 1
- Coding Heatmap Opening Range Breakout Strategy in Python – Part 2
Markov Chain
- Stochastic Modeling in Stock Market
- Application of Markov Chains in Stock Market
- Markov Chains in Stock Market Using Python – Getting Transition Matrix
- How to do Random Walk using NSEPython in Indian Stock Market
- Markov Chain and Linear Algebra – Calculation of Stationary Distribution using Python
- Find the Equilibrium Matrix in Markov Chain using Python in Indian Stock Market
Leverage
In Leverage, a plethora of trader-focused tools has been meticulously crafted using NSEPython.
Here's an illustration of a Sectoral Heatmap, showcasing the extent of complexity that NSEPython API can effortlessly handle.
Metadata
Release files for nsepython 2.98
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nsepython-2.98.tar.gz | 39.4 kB | With provenance | Details for nsepython-2.98.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nsepython-2.98-py3-none-any.whl | Python 3 | none | any | Details for nsepython-2.98-py3-none-any.whl |
Total release size: 76.7 kB
Release files / nsepython-2.98.tar.gz
| Download URL | nsepython-2.98.tar.gz |
|---|---|
| Size | 39.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d23026de68676195b8933e80edf61a2ceb35ce287e30c045b7c590be7506fb9
|
|
BLAKE2b-256 checksum How to use checksums |
1a33888c66e998d497a92689bc6f21382b46ed114dad61715e68844811c91947
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logRelease files / nsepython-2.98-py3-none-any.whl
| Download URL | nsepython-2.98-py3-none-any.whl |
|---|---|
| Size | 37.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ddb74ab1b5e5dc2f6faedbc70f0c263e82ca28e449da6a29bcca011befe7d59
|
|
BLAKE2b-256 checksum How to use checksums |
842c86650b5ab193e7803cc8e4c6b6c4c1269c82414b7b9394ee7feea5f40b33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logSecurity for nsepython 2.98
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for nsepython-2.98.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.