Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finance data on alphavantage

I was trying to get JSON for a company by calling API of alphavantage .For some company data is coming and for some company, it's failing. Company for which data are coming - TCS,INFY,MSFT Company for which data are failing - TATAMOTORS,RCOM,SBIN

Link for TCS JSON

https://www.alphavantage.co/query?function=TIME_SERIES_DAILY_ADJUSTED&symbol=TCS&outputsize=full&apikey={API_KEY}

LINK for TATAMOTORS

https://www.alphavantage.co/query?function=TIME_SERIES_DAILY_ADJUSTED&symbol=TATAMOTORS&outputsize=full&apikey={API_KEY}

Can anyone please help me why this is happening?

like image 959
nil96 Avatar asked Aug 20 '17 05:08

nil96


3 Answers

First of all to get data of TataMotors You have to change your symbol to TTM instead of TATAMOTORS

See Here

here is your TTM's Data

https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=TTM&interval=1min&apikey=yourapiket&datatype=json

In My case :

I want to get stock data of Infosys Ltd NSE stock. incase symbol is INFY

get get Stock data of this company i just tried "INFY.NS"

it's working you can check url by putting your api key to the url

https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=INFY.NS&interval=1min&apikey=yourapikey

You have to find proper symbol for all company which will be found from my google drive : Download Complete CSV Data

like image 156
Rj_Innocent_Coder Avatar answered Oct 20 '22 21:10

Rj_Innocent_Coder


Alpha Vantage is showing the BSE data accurately. All you need to do it add .BO at the end of the symbol. (SBIN.BO for example) I'm not sure how to get NSE data, if at all it is possible.

like image 24
Prateek Avatar answered Oct 20 '22 21:10

Prateek


The solution is to include exchange in the symbol as follows:

symbol=EXCHANGE:SYMBOL

For example, for query works : https://www.alphavantage.co/query?function=TIME_SERIES_DAILY_ADJUSTED&symbol=NSE:TATAMOTORS&outputsize=full&apikey={API_KEY}

like image 34
Sandeep Deshmukh Avatar answered Oct 20 '22 23:10

Sandeep Deshmukh