Skip to main content

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.

📖 Full documentation

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 — NiftyIndicesClient with 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.Date dates, pl.Float64 numerics
  • No API key — all endpoints are public

Links

Metadata

Release files for nseindiapy 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nseindiapy 0.1.0
File Size Uploaded Provenance
nseindiapy-0.1.0.tar.gz 10.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nseindiapy 0.1.0
File Interpreter ABI Platform
nseindiapy-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.3 kB

Release files / nseindiapy-0.1.0.tar.gz

Download URL nseindiapy-0.1.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2724c94fc5e6c3552b579be38ce8be7aba6db9464da27455f0c92aa497b0455f
BLAKE2b-256 checksum
How to use checksums
3cd3dae5d58e6f6d9adeb87c9dcfdff4baed71f499417231ee055671cbdd2de5
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / nseindiapy-0.1.0-py3-none-any.whl

Download URL nseindiapy-0.1.0-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a2529c94fc32f4f2183afd67a45b363b56cf15984dd2424de06e6be37b15321
BLAKE2b-256 checksum
How to use checksums
6d11341e0469237eb7bf573b4180a17a6db51d033d4662bcbf1a44338cacb909
Upload date
Uploaded using Trusted Publishing?
What is 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}

Security for nseindiapy 0.1.0

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.

No provenance found

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

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page