0
votes

This is my code. It is a simple python program that should return stock data however it tells me " ValueError: Invalid API call. Please retry or visit the documentation (https://www.alphavantage.co/documentation/) for TIME_SERIES_INTRADAY." I have no idea what I have done wrong. Please help.

...

import pandas as pd
from alpha_vantage.timeseries import TimeSeries
import time

stock_api_key = '546M72GB5ZUMCF4H'
ts = TimeSeries(key=stock_api_key, output_format='pandas')
data, metadata = ts.get_intraday(symbol='DSNY', interval='1min', outputsize='full')
print(data)

...

1

1 Answers

0
votes

There is nothing wrong with your code, I think Alpha Vantage just doesn't support your selected ticker DSNY. It's quite low volume, it may not be a "large" enough stock to be covered.