I am getting an error when trying to extract historic gold prices using get_currency_exchange_daily
for gold spot prices.
Here is an example of a python code that raises an error ValueError: Invalid API call. Please retry or visit the documentation (https://www.alphavantage.co/documentation/) for FX_DAILY.
from alpha_vantage.foreignexchange import ForeignExchange
# Your key here
key = 'XXX'
ts = ForeignExchange(key)
price, meta = ts.get_currency_exchange_daily(from_symbol='XAU', to_symbol='USD')
While this python code executes just fine
from alpha_vantage.foreignexchange import ForeignExchange
# Your key here
key = 'XXX'
ts = ForeignExchange(key)
price, meta = ts.get_currency_exchange_rate(from_currency='XAU', to_currency='USD')
I'm running it with Python 3.8.2 from Anaconda environment, although it should not make a difference. Would appreciate help.