Skip to main content

BseIndiaApi

An Unofficial Python Api for BSE India stock exchange.

Python version: >= 3.8

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.

Download files

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

Source Distribution

bse-3.3.1.tar.gz (29.8 kB view details)

Uploaded Source

Built Distribution

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

bse-3.3.1-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

Details for the file bse-3.3.1.tar.gz.

File metadata

  • Download URL: bse-3.3.1.tar.gz
  • Upload date:
  • Size: 29.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bse-3.3.1.tar.gz
Algorithm Hash digest
SHA256 981306108df71e5132f2a2fe1a04fcf5c26d6d064a7775663c317f50086093b7
MD5 b6d06cc5991ecae2e45081d17197bcd3
BLAKE2b-256 3a0ee3e926ec3d33696ebf612e8830e8cdcf8f6fbd4dbc42f643b5cf0431cfa2

See more details on using hashes here.

Provenance

The following attestation bundles were made for bse-3.3.1.tar.gz:

Publisher: python-publish.yml on BennyThadikaran/BseIndiaApi

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-3.3.1-py3-none-any.whl.

File metadata

  • Download URL: bse-3.3.1-py3-none-any.whl
  • Upload date:
  • Size: 29.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bse-3.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5bc27b7a2c4f126e43a324855fe317606ecfa06f032620cf3fb118fe31491e60
MD5 080721304ed13dd9a388a1e417ffde88
BLAKE2b-256 4afce2a0bd1e1c2bd78bab03e079acba44fa7989834af12c719dade696c87115

See more details on using hashes here.

Provenance

The following attestation bundles were made for bse-3.3.1-py3-none-any.whl:

Publisher: python-publish.yml on BennyThadikaran/BseIndiaApi

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

Release history Release notifications | RSS feed

This release

3.3.1 This release

2 files

3.3.0

2 files

3.2.0

2 files

3.1.0

2 files

3.0.2

2 files

3.0.1

2 files

2.0.3

2 files

2.0.2.post1

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.0.0

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 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