nseindiapy
Python client for NSE Indices (niftyindices.com) — historical OHLC, TRI, P/E-P/B, India VIX, live index snapshot, daily snapshots, monthly reports, and the trading holiday calendar. All tabular data returned as Polars DataFrames.
Installation
pip install nseindiapy
# or
uv add nseindiapy
Quick Start
from datetime import date
from nseindiapy import NiftyIndicesClient
client = NiftyIndicesClient()
# Historical OHLC — auto-paginates for ranges > 365 days
df = client.historical.price_history("NIFTY 50", date(2024, 1, 1), date(2024, 12, 31))
# Total Return Index
tri = client.historical.tri_history("NIFTY 50", date(2024, 1, 1), date(2024, 12, 31))
# P/E, P/B, Dividend Yield
pepb = client.historical.pepb_history("NIFTY 50", date(2024, 1, 1), date(2024, 12, 31))
# India VIX (from daily snapshot CSV)
vix = client.historical.vix_history(date(2024, 1, 1), date(2024, 12, 31))
# Live indices (131 indices, CDN, no auth)
live = client.live.live_indices()
# Daily closing snapshot (all indices)
snap = client.reports.daily_snapshot(date.today())
# Holiday calendar
holidays = client.holidays.get_holidays(2026)
trading = client.holidays.trading_days(date(2026, 1, 1), date(2026, 3, 31))
Features
- Single entry point —
NiftyIndicesClientwith four sub-modules - Auto-pagination — 365-day API limit handled transparently
- Session seeding — ASP.NET cookie seeded automatically; no manual setup needed
- Polars DataFrames — typed columns,
pl.Datedates,pl.Float64numerics - No API key — all endpoints are public
Links
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nseindiapy-0.1.0.tar.gz
(10.4 kB
view details)
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 nseindiapy-0.1.0.tar.gz.
File metadata
- Download URL: nseindiapy-0.1.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2724c94fc5e6c3552b579be38ce8be7aba6db9464da27455f0c92aa497b0455f
|
|
| MD5 |
ea2238c02faa031e1425c2fb708c8f84
|
|
| BLAKE2b-256 |
3cd3dae5d58e6f6d9adeb87c9dcfdff4baed71f499417231ee055671cbdd2de5
|
File details
Details for the file nseindiapy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nseindiapy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a2529c94fc32f4f2183afd67a45b363b56cf15984dd2424de06e6be37b15321
|
|
| MD5 |
9139d3bcae6c3e3be5266fcfa8960bf6
|
|
| BLAKE2b-256 |
6d11341e0469237eb7bf573b4180a17a6db51d033d4662bcbf1a44338cacb909
|