A utility for crawling historical and Real-time data from stock exchanges of Bangladesh. At present this utility can collect data from Dhaka and Chittagong stock exchange.
$ pip install bdshare
or upgrade
$ pip install -U bdshare
from bdshare import get_current_trade_data
df = get_current_trade_data()
print(df.to_string())
from bdshare import get_current_trade_data
df = get_current_trade_data('GP') # get specific instrument data
print(df.to_string())
from bdshare import get_hist_data
df = get_hist_data('2022-03-01','2022-03-02') # get all instrument data
print(df.to_string())
or
from bdshare import get_hist_data
df = get_hist_data('2022-03-01','2022-03-02','ACI') # get specific instrument data
print(df.to_string())
from bdshare import get_basic_hist_data
df = get_basic_hist_data('2022-03-01','2022-03-02') # get all instrument data
print(df.to_string())
or
from bdshare import get_basic_hist_data
df = get_basic_hist_data('2022-03-01','2022-03-02','GP') # get specific instrument data
print(df.to_string())
from bdshare import get_market_inf
df = get_market_inf() # get last 30 days market data
print(df.to_string())
from bdshare import get_market_inf_more_data
df = get_market_inf_more_data('2022-03-01','2022-03-02') # get historical market data
print(df.to_string())
from bdshare import get_cse_current_trade_data
df = get_cse_current_trade_data() # get all instrument data
print(df.to_string())
from bdshare import get_cse_current_trade_data
df = get_cse_current_trade_data('GP') # get specific instrument data
print(df.to_string())
Function | Params | Description |
---|---|---|
get_current_trade_data() | ||
get_dsex_data() | ||
get_current_trading_code() | ||
get_hist_data() | ||
get_basic_hist_data() | ||
get_close_price_data() | ||
get_last_trade_price_data() | ||
get_cse_current_trade_data() |
Function | Params | Description |
---|---|---|
get_agm_news() | ||
get_all_news() |
Function | Params | Description |
---|---|---|
get_market_inf() | ||
get_latest_pe() | ||
get_market_inf_more_data() | ||
get_market_depth_data() |
- refine logic for parameters
- examples;
- DSE daily data and historical data crawling
- DSE news,p/e crawling
- Add CSE support for last trading price
- Add DSE Index data support
- Add DSEX Index data support
- Add P/E and historical data scraping form CSE
Complete documentation can be found at Readthedocs .
Anyone and everyone is welcome to contribute. Please take a moment to review the guidelines for contributing.