ENV["ALPHA_VANTAGE_API_KEY"] = "your key"
# Get daily S&P 500 data
spy = time_series_daily("SPY", datatype="csv");
# Convert to a DataFrame
data = DataFrame(spy);
# Add column names
data = rename(data, Symbol.(vcat(spy...)));
# Convert timestamp column to Date type
data[!, :timestamp] = Dates.Date.(data[!, :timestamp]);
data[!, :open] = Float64.(data[!, :open])
# Plot the timeseries
plot(data[!, :timestamp], data[!, :open], label=["Open"])
@dm13450 Hello, your AlphaVantage package look awesome, i´m looking forward to used, i was wondering if you guys can help me make it run. I followed the instruction, i got the Key and everything, but when i try to run the code that you have I got the following error:
Thanks for using the package and sorry that it doesn’t seem to be working.
A few things you can try:
Can you confirm that your api key is in the ENV correctly? I.e. ENV["ALPHA_VANTAGE_API_KEY"]
should return your key.
Secondly, try updating your packages? ] update
Otherwise I’m not too sure what is going wrong, it looks like an error in one of the networking packages AlphaVantage.jl uses. I’ve been able to pull USDCLP data on my machine without the error.