PowerNSE
NSE end-of-day archives. On your disk. Under your control.
One CLI · a small Python API · no third-party dump path
Docs · Quick start · PyPI · Changelog · Disclaimer
|
Disclaimer — PowerNSE is not affiliated with, endorsed by, or connected to the National Stock Exchange of India (NSE) or any related entity. It is an unofficial tool for educational and research use only — not financial advice, and not an NSE product or data feed. You are responsible for how you use the software and any data it retrieves, including compliance with NSE terms of use. The author accepts no liability for losses, damages, or other consequences arising from use of this package. Use at your own risk. Full text: DISCLAIMER.md · docs. |
NSE publishes end-of-day files. The URLs drift, the session cookie is fussy, and
relearning the layout every quarter is a tax. PowerNSE downloads those
archives into a local nse-data/ tree, records a SHA-256 manifest, and gives you
OHLC from the CLI or from Python — from the exchange, not from a scraped dump.
Two ways in:
- Build it — point the downloaders at NSE (
bhavcopy, F&O, indexes, deals, …). - Fetch it —
powernse fetch-bundleextracts the trackednse-data/from this repo.
Requires Python 3.13+.
Install
pip install powernse
Quick start
powernse bhavcopy --resume
powernse fo-bhavcopy --resume --days 30
powernse index-closes --from 2024-08-01 --to 2024-08-05
powernse fetch-bundle --force # optional: GitHub-hosted archive
powernse status
powernse ohlc RELIANCE --from 2024-08-01 --to 2024-08-05
powernse doctor
from datetime import date
from powernse import BhavcopyDownloader, NSEData
BhavcopyDownloader("./nse-data").download_range(date(2024, 8, 1), date(2024, 8, 5))
data = NSEData("./nse-data")
bars = data.ohlc("RELIANCE", from_date=date(2024, 8, 1), to_date=date(2024, 8, 5))
Walkthrough: quickstart.
What you get
| Surface | Covers |
|---|---|
| Cash / F&O / full bhavcopy | Daily equity and derivatives archives |
| Index closes & constituents | Index levels and membership snapshots |
| Bulk / block deals, F&O ban | As-of snapshots |
| Corporate actions | JSON for adjustment helpers |
NSEData / CLI |
OHLC, coverage gaps, inventory, doctor |
fetch-bundle |
Zip extract of this repo's nse-data/ |
Trading days use XBOM sessions when exchange-calendars covers the window
(from 2006-08-16). Earlier dates fall back to weekdays.
Archive layout
nse-data/
raw/bhavcopy/YYYY/YYYY-MM-DD.csv
raw/fo_bhavcopy/…
raw/full_bhavcopy/…
raw/index_closes/…
raw/bulk_deals/… raw/block_deals/… raw/fo_secban/…
raw/corporate_actions/YYYY/YYYY-MM-DD.json
raw/index_constituents/YYYY/YYYY-MM-DD_<index>.json
manifest/downloads.jsonl
Etiquette
Requests are throttled; an NSE session cookie is primed first. Keep date ranges
modest; --skip-existing is on by default. Exchange URLs can change without notice.
No Kaggle (or other third-party dump) path. Rough historical OHLCV for experiments belongs elsewhere — PowerNSE sticks to archives published by the exchange.
Documentation
| Guide | Link |
|---|---|
| Install | pip / uv / clone |
| Quick start | Download + query |
| Archives | Every downloader |
| NSEData | Python API |
| fetch-bundle | GitHub zip extract |
| Disclaimer | Unofficial · educational use |
License
MIT — see LICENSE. Also read DISCLAIMER.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file powernse-0.1.2.tar.gz.
File metadata
- Download URL: powernse-0.1.2.tar.gz
- Upload date:
- Size: 30.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
529c22077289e8167526286ca606da411a56f74dd2497a07de5674128973cb2c
|
|
| MD5 |
2ecb8d296fc651971b1768348e7bd12f
|
|
| BLAKE2b-256 |
12d560b4e2420ff3b1d22fd8caec3a7ec8ff0d1bddd0acc0d4918bc5241d97b4
|
File details
Details for the file powernse-0.1.2-py3-none-any.whl.
File metadata
- Download URL: powernse-0.1.2-py3-none-any.whl
- Upload date:
- Size: 48.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a78ad3d916d5f18d8049765f82e9bf05056cde0536699c9d6955fb74a2eeef4
|
|
| MD5 |
93f3d2a21d2d0e6f0ce6462164bac5cf
|
|
| BLAKE2b-256 |
c4f538ea318009b9760fea3f89e2ecfb96bfd1125c8a95131869d333b7d28687
|