Unofficial Python Api for BSE India stock exchange
Project description
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 infyto print the recent corporate actions. Nothing more. - advances.py:
py advances.pyto 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 bse-3.1.0.tar.gz.
File metadata
- Download URL: bse-3.1.0.tar.gz
- Upload date:
- Size: 28.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
249cb33343d5493f1c053413eadedde25fc327a33166db5ed6816abf258c1e95
|
|
| MD5 |
7917e476cc1dc6e74da8e7e3f7d92276
|
|
| BLAKE2b-256 |
733e3451b733688b0f7d65c807c3c1c29b786809c861aa5ac9b7e4235a6edf90
|
Provenance
The following attestation bundles were made for bse-3.1.0.tar.gz:
Publisher:
python-publish.yml on BennyThadikaran/BseIndiaApi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bse-3.1.0.tar.gz -
Subject digest:
249cb33343d5493f1c053413eadedde25fc327a33166db5ed6816abf258c1e95 - Sigstore transparency entry: 367544175
- Sigstore integration time:
-
Permalink:
BennyThadikaran/BseIndiaApi@8be920744364f139ff2b0adcaee4d15a92fcf1b2 -
Branch / Tag:
refs/tags/v3.1.0 - Owner: https://github.com/BennyThadikaran
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8be920744364f139ff2b0adcaee4d15a92fcf1b2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bse-3.1.0-py3-none-any.whl.
File metadata
- Download URL: bse-3.1.0-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34c70c91ec4578676e8f6044dd6d45073c9e320ce5f268f63df30bf7990d5731
|
|
| MD5 |
a416be9c119d3bd8286230bd741dddf5
|
|
| BLAKE2b-256 |
974e7a4136351dcad5d0a4bd9edab464bf57007e5f233c3d01e0319f22180ff2
|
Provenance
The following attestation bundles were made for bse-3.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on BennyThadikaran/BseIndiaApi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bse-3.1.0-py3-none-any.whl -
Subject digest:
34c70c91ec4578676e8f6044dd6d45073c9e320ce5f268f63df30bf7990d5731 - Sigstore transparency entry: 367544195
- Sigstore integration time:
-
Permalink:
BennyThadikaran/BseIndiaApi@8be920744364f139ff2b0adcaee4d15a92fcf1b2 -
Branch / Tag:
refs/tags/v3.1.0 - Owner: https://github.com/BennyThadikaran
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8be920744364f139ff2b0adcaee4d15a92fcf1b2 -
Trigger Event:
push
-
Statement type: