Skip to main content Switch to mobile version nselite 0.4.0 Unofficial, lean, async-first Python client for publicly available NSE India end-of-day reports and market data
pip install nselite==0.4.0 Copy PIP instructions
Lean, async-first Python library to fetch publicly available end-of-day reports and market data from NSE India. Python 3.12+, two runtime dependencies (httpx[http2], orjson).
nselite is an independent open-source project. It is not affiliated with, endorsed by or connected to National Stock Exchange of India Ltd. See Disclaimer.
Focus: equities. nselite covers the capital market (equities, including SME), indices and India VIX. Futures and options (F&O) data, including option chains and open interest, are not available, and neither are currency or commodity markets.
import asyncio from datetime import date from pathlib import Path from nselite import NSE, ReportKey async def main(): async with NSE() as nse: # Latest file, located via NSE's own report metadata await nse.download_report(ReportKey.CM_UDIFF_BHAVCOPY, Path("data")) # Backfill: concurrent, throttled to 3 req/s, holidays come back as None days = [date(2026, 11, d) for d in range(16, 20)] await nse.download_reports(ReportKey.CM_52W_HIGH_LOW, days, Path("data")) asyncio.run(main()) Blocking scripts can use SyncNSE, which has the same methods without await.
More in a few lines:
from datetime import date from nselite import SyncNSE from nselite.frames import to_pandas with SyncNSE() as nse: nifty = nse.index_history("NIFTY 50", date(2021, 1, 1), date(2026, 1, 1)) # all 5 years df = to_pandas(nse.equity_history("TCS")).set_index("date") # last 30 days holidays = nse.holidays()["CM"] movers = nse.equity_stocks_by_index("NIFTY 50") Examples
Runnable scripts for every function, in examples/:
Run one with uv run python examples/03_history.py; files go under ./data.
Not covered: futures and options (option chains, open interest, F&O bhavcopies), currency and commodity derivatives, and per-symbol live quotes.
All options in one place: REFERENCE.md lists every ReportKey with its NSE file, the accepted values of every parameter, index names (NSE spells them differently per endpoint), series codes, client settings and errors.
Migrating from NseIndiaApi
Change one import; old method names and error handling keep working:
from nselite.compat import NSE # was: from nse import NSE except RuntimeError / ConnectionError blocks keep working: nselite's errors subclass them.
A method outside nselite's scope (derivatives, option chain, IPO lists...) raises an AttributeError that names it.
nse.lookup() still returns the old {"symbols": [...]} shape through compat; the native NSE.lookup() returns NSE's current flat list.
Later, move hot paths to the async nselite.NSE to download many dates concurrently.
See CONTRIBUTING.md for setup, adding reports and endpoints, checks and releases.
nselite is built on the work of Benny Thadikaran, author of NseIndiaApi. Its session handling, endpoint knowledge and corporate-filing code are the foundation nselite was trimmed down and rebuilt from. Thank you, Benny.
Report URL patterns and date-chunking limits were cross-checked against nselib by Ruchi Tanmay and Amlan Mishra.
Unofficial. nselite is not affiliated with, endorsed by, sponsored by or connected to National Stock Exchange of India Ltd (NSE) or NSE Indices Ltd. "NSE", "NIFTY" and related names are trademarks of their respective owners and are used here only to describe the data source.
Public data only. nselite requests the same pages, APIs and archive files that NSE publishes on its public website for anyone to view or download. It needs no login and does not access anything behind one.
Use it gently. Requests are limited to 3 per second by default. Don't raise that limit or run many clients in parallel; heavy traffic can get your IP blocked and burdens NSE's servers.
No warranty. Data may be delayed, incomplete or wrong, and NSE can change or withdraw any endpoint without notice. Nothing here is investment advice. nselite is provided as is, without warranty of any kind; see LICENSE.
GPL-3.0-or-later, the same license as NseIndiaApi, from which parts of this code derive.
Upstream (NseIndiaApi)
Released: Nov 29, 2026
Author/Maintainer: PriceCatch
GPL-3.0-or-later View SPDX License List
bhavcopy nse nse-india stock-market xbrl
Development Status 3 - Alpha
Intended Audience Developers
Financial and Insurance Industry
Operating System OS Independent
Programming Language Python :: 3 :: Only
Topic Office/Business :: Financial :: Investment
Release files for nselite 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 118.2 kB
Release files / nselite-0.4.0.tar.gz
Release files / nselite-0.4.0-py3-none-any.whl
Security for nselite 0.4.0
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.
None of the files in this release were uploaded with provenance metadata.
A 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.
Release history Release notifications | RSS feed
Nov 29, 2026 2 release files No provenance
Nov 20, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from fc0d8e6











