Finance data on alphavantage

nil96 picture nil96 · Aug 20, 2017 · Viewed 17.9k times · Source

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?

Answer

Sandeep Deshmukh picture Sandeep Deshmukh · Sep 18, 2017

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}