I'm trying to make a simple GUI that collects a few sets of historical stock data from Alpha Vantage. I'm getting this error:
File "d:\GIT\StockAI\main.py", line 34, in run
data = ts.get_daily(symbol=stock, outputsize='full')
File "C:\Users\benlu\Anaconda3\lib\site-packages\alpha_vantage\alphavantage.py", line 178, in _format_wrapper
data = call_response[data_key]
KeyError: 'Time Series (Daily)'
I'm not entirely sure what that means, and I'm having some trouble googling the issue. I assume it's something rather simple that I'm missing. Additionally, the output format is set to pandas, if that's important. Here's (hopefully) all the relevant code:
stockList = ["AAPL", "AMZN", "GOOG", "GOOGL", "MSFT", "JPM", "JNJ", "BA"]
for stock in stockList:
data = ts.get_daily(symbol=stock, outputsize='full')
data[0].to_csv(stock + '.csv')
It seems to work rather randomly; it'll collect a few .csv files and then just seemingly randomly it will stop... anyone have any help to send my way? I'd greatly appreciate it!