Skip to main content

BseIndiaApi

An Unofficial Python Api for BSE India stock exchange.

Python version: >= 3.8

⚠️ Advisory: BSE appears to be transitioning to a new API, and endpoint changes may cause 403 Forbidden errors. v3.3.2 includes a User-Agent update that fixes the current issue. A broader endpoint update is still being investigated. See Issue #17 for updates.

Install with PIP

pip install -U bse

Documentation

https://bennythadikaran.github.io/BseIndiaApi/

You might like stock-news built using BseIndiaApi. It helps to keep track of corporate announcements and actions on your portfolio.

Usage

Using with statement

from bse import BSE

with BSE(download_folder='./') as bse:
    scripCode = bse.getScripCode('tcs')  # 532540 bse scrip code

    data = bse.actions(scripcode=scripCode)

    ohlc = bse.quote(scripCode)  # Open, High, Low, LTP

or

from bse import BSE
from bse.constants import INDEX

bse = BSE(download_folder='./')

code = bse.getScripCode('tcs')  # 532540 bse scrip code

gainers = bse.gainers(by='index', name=INDEX.BSE500)

bse.exit()  # close the request session

Sample Responses

src/samples contain the sample responses from the various methods in JSON format.

The files are named after the corresponding method in src/BSE.py. Use it to understand the API response structure.

Example Folder

src/examples contains scripts that use the BSE.py.

To use the scripts download or clone the repo.

  • get_all_announcements.py: This file demonstrates how to paginate and get all announcements using BSE.announcements. It has step by step explanation of code.
  • actions.py: py actions.py infy to print the recent corporate actions. Nothing more.
  • advances.py: py advances.py to print the advance decline ratios for various bse Indexes.

You may also like my other repo: Stock-News - It uses BseIndiaApi and displays stock announcements, dividend, bonus/splits and upcoming results etc for your portfolio or watchlist stocks.

Metadata

Release files for bse 3.3.3

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

Source distribution (sdist)

Source distribution for bse 3.3.3
File Size Uploaded
bse-3.3.3.tar.gz 30.0 kB Details

Built distribution (wheel)

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

Total release size: 59.2 kB

Release files / bse-3.3.3.tar.gz

Download URL bse-3.3.3.tar.gz
Size 30.0 kB
Tags Source
SHA-256 checksum
How to use checksums
96b88d6d544e29d7f50c30e8a102339bc3ef7074a401b652ed9720f22e539624
BLAKE2b-256 checksum
How to use checksums
cfbb5bd12155688404dc084566a33e51eb302dd6b710e997c435d8e4402ce5c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release files / bse-3.3.3-py3-none-any.whl

Download URL bse-3.3.3-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2292555c4b8180355d288e98ffcdcd521108739aa2847ca3ba66dc4de6b9522a
BLAKE2b-256 checksum
How to use checksums
655486b848f92dae3c0d6f793a2faefc622c4a5057862aebbd790b886d997bc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.3.3 This release

2 release files

3.3.2

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.2

2 release files

3.0.1

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

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