A Julia wrapper for the Alpha Vantage API.
This package is a Julia wrapper for the Alpha Vantage API. Alpha Vantage provides free realtime and historical data for equities, digital currencies (i.e. cryptocurrencies), and more than 50 technical indicators (e.g. SMA, EMA, WMA, etc.).
The Alpha Vantage API requires a free API key.
Pkg.add("AlphaVantage")
and once you have obtained your API key set it as an environment variable.
ENV["ALPHA_VANTAGE_API_KEY"] = "YOURKEY"
If you encounter a clear bug, please file a minimal reproducible example on GitHub.
using AlphaVantage
using DataFrames, StatsPlots, Dates
gr(size=(800,470))
# Get daily S&P 500 data
spy = time_series_daily("SPY", datatype="csv");
# Convert to a DataFrame
data = DataFrame(spy[1]);
# Add column names
data = rename(data, Symbol.(vcat(spy[2]...)));
# 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"])
savefig("sp500.png")