sdabhi23 / bsedata

Python library for extracting real-time data from Bombay Stock Exchange (India)
https://bsedata.readthedocs.io/en/latest/
MIT License
105 stars 48 forks source link

Historical EOD data for stocks #3

Closed fightthepower closed 9 months ago

fightthepower commented 5 years ago

I want to download historical EOD OHLCV data for stocks. Is it gonna be added in this library or can you recommend a library where we can download bse historical EOD data from bse.

sdabhi23 commented 5 years ago

Hey @fightthepower you can manually download the historical data from https://www.bseindia.com/market_data.html, I do plan to include it in a later version, but it's on the backburner as of now as I have to improve the support for live data first!

fightthepower commented 5 years ago

Hey thanks for the reply. I know we can manually download it from bse site. But I want to download more than 100 stocks in that case manual would be harder. I am also planning to update stock prices daily. A python library would have helped a lot. I regularly uses nsepy and its a life saver.

Can you please take this additional request; please make historical prices a pandas dataframe. So that we can easily manipulate the data. Once more thank you for this library I was searching for a nsepy alternative for bse.

shikharparikh commented 4 years ago

Hey thanks for the reply. I know we can manually download it from bse site. But I want to download more than 100 stocks in that case manual would be harder. I am also planning to update stock prices daily. A python library would have helped a lot. I regularly uses nsepy and its a life saver.

Can you please take this additional request; please make historical prices a pandas dataframe. So that we can easily manipulate the data. Once more thank you for this library I was searching for a nsepy alternative for bse.

Use Quandl API

fightthepower commented 4 years ago

I did use Quandl free API but it had some problems in its historical data. Quandl updates the bse EOD and other free data very late (2-3 days delay). So its useless for me.

sdabhi23 commented 9 months ago

https://www.bseindia.com/markets/equity/EQReports/StockPrcHistori.html?flag=0

This is the current page where the historical data is available. Trying to find alternatives, as I am not able to figure out a way to scrape this page or get the data from the APIs.

EDIT: New link for the Bhav Copy page: https://www.bseindia.com/markets/MarketInfo/BhavCopy.aspx This data is more openly available, but takes 1 API call for each date and fetches data for all scrip codes at once. Not the ideal desired behavior, but for now it will have to do.