AlphaVantage was my go to API to get the historical share price for NSE listed companies. But some time in Jun’2020, they removed the NSE data. The API works for US companies but does not give data for NSE listed companies. It was probably the simplest (and cheapest), in my opinion, API available.
I looked around for other alternatives, but they were simply too expensive for me. The best free alternative I could find was – Google Sheets.
Open Google Sheets and in the cell A1 enter the GOOGLEFINANCE
formula as below. Replace the <SYMBOL>
with NSE symbol, for e.g. NSE:HDFCBANK
.
=GOOGLEFINANCE("<SYMBOL>", "price", DATE(2001,1,1), today(), "DAILY")
You can then save this file as CSV using the menu “File > Download > Comma-separated values”. There are a attributes like high
, low
, volume
etc. that can be fetched. This is not the best solution, but hey it works. And its free!