Skip to main content

Download BSE India market data as pandas DataFrames — SENSEX, BSE indices, historical OHLC. Works on AWS Lambda.

Project description

bse-index-data

PyPI version Python 3.9+ License: MIT

BSE India market data as pandas DataFrames.
SENSEX, BSE500, BANKEX and 50+ indices — historical OHLC + live quotes.
Works on AWS Lambda and any cloud environment.

pip install bse-index-data

Part of the indian-market-data monorepo.


Quick Start

from bsedata import bse

# Historical SENSEX OHLC
df = bse.get_index("SENSEX", "2026-01-01", "2026-05-22")

# Historical BSE500
df = bse.get_index("BSE500", "2026-01-01", "2026-05-22")

# All 120+ indices for one date (single API call)
df = bse.get_all_indices("2026-05-22")

# Live SENSEX quote
df = bse.get_live_sensex()

# Download to S3 (Lambda with IAM role)
bse.download_index("SENSEX", "2026-01-01", "2026-05-22",
                   s3_bucket="my-bucket", s3_prefix="raw/bse/")

# List all 55 supported indices
bse.list_indices()
bse.list_indices(category="Sectoral")

Supported Indices (55)

Category Indices
Broad Market SENSEX, SENSEX50, SENSEXNXT50, BSE100, BSE200, BSE500, BSEALLCAP, BSEMIDCAP, BSESMALLCAP, BSE150MIDCAP, BSE250SMALLCAP, BSE400MIDSMALLCAP, BSE250LARGEMIDCAP, BSEMIDCAPSELECT, BSESMALLCAPSELECT, BSELARGECAP
Sectoral BANKEX, BSEAUTO, BSECG, BSECD, BSECDGS, BSEENERGY, BSEFMCG, BSEFINANCE, BSEHC, BSEIT, BSEINDUSTRIALS, BSEMETAL, BSEOILGAS, BSEPOWER, BSEPRIVATEBANKS, BSEPSU, BSEREALTY, BSESERVICES, BSETECK, BSETELECOM, BSEUTILS
Thematic BSECPSE, BSEIPO, BSESMEIPO, BSEGREENEX, BSECARBONEX, BSEINFRA, BSEMANUFACTURING, BHARAT22
Strategy BSEMOMENTUM, BSEQUALITY, BSEVALUE, BSELOWVOL, BSEDIVSTAB, BSE100ESG
Global DOLLEX30, DOLLEX100, DOLLEX200

CLI

bse-index-data list
bse-index-data list --category Sectoral
bse-index-data index --name SENSEX --from 2026-01-01 --to 2026-05-22
bse-index-data all-indices --date 2026-05-22
bse-index-data live

Polars output (optional)

By default every function returns a pandas DataFrame. To get polars DataFrames instead, install the extra and set one environment variable before importing — no code changes needed:

pip install bse-index-data[polars]
import os
os.environ["IMD_DATAFRAME"] = "polars"   # set before importing bsedata

from bsedata import bse
df = bse.get_index("SENSEX", "2026-01-01", "2026-05-22")
type(df)   # polars.DataFrame

All internal logic stays in pandas; conversion happens only at the final return step. Leave IMD_DATAFRAME unset (or =pandas) for the default pandas output.

License

MIT — data from BSE India.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bse_index_data-1.1.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bse_index_data-1.1.1-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file bse_index_data-1.1.1.tar.gz.

File metadata

  • Download URL: bse_index_data-1.1.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bse_index_data-1.1.1.tar.gz
Algorithm Hash digest
SHA256 a803d70206be819acc839c17d52d37e27bcbcb51c522d240d2d9a8bcf1e05444
MD5 f19973527b55778a0ec5f575a6131688
BLAKE2b-256 b66da7fb6e93933245cb18231a029b131a5b87c9b747a28482dfd6f1025d4169

See more details on using hashes here.

Provenance

The following attestation bundles were made for bse_index_data-1.1.1.tar.gz:

Publisher: publish-bse.yml on NikhilSuthar/indian-market-data

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bse_index_data-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: bse_index_data-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bse_index_data-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a38b0a2fae2b3b797d2e6ddfd5d6045ddef8dc4a8a993292ecdaa2bc4e6895ba
MD5 56bbee4fef26632fb4c85568f82aae91
BLAKE2b-256 4ee0f5de0d9e33e5f250bc2bf7ece5c5da08c2eadf6c324f6fa8ddc0447d63cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for bse_index_data-1.1.1-py3-none-any.whl:

Publisher: publish-bse.yml on NikhilSuthar/indian-market-data

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page