AlphaVantage.jl
v0.4.2
Um invólucro de Julia para a API Alpha Vantage.
Este pacote é um invólucro Julia para a API Alpha Vantage. A Alpha Vantage fornece dados históricos e gratuitos em tempo real e histórica para ações, moedas físicas, moedas digitais (por exemplo, criptomoedas) e mais de 50 indicadores técnicos (por exemplo, SMA, EMA, WMA, etc.).
A API Alpha Vantage requer uma chave API gratuita.
Pkg . add ( " AlphaVantage " )E depois de obter sua chave da API, passe para o cliente da seguinte forma:.
using AlphaVantage
client = AlphaVantage . GLOBAL[]
client . key = " YOURKEY "ou defina -o como uma variável de ambiente
export ALPHA_VANTAGE_API_KEY=YOURKEYe verifique se está definido usando:
using AlphaVantage
AlphaVantage . GLOBAL[]Se você encontrar um bug claro, registre um exemplo reproduzível mínimo no GitHub.
using AlphaVantage
using DataFrames, StatsPlots, Dates
gr (size = ( 800 , 470 ))
# Get daily S&P 500 data
spy = time_series_daily ( " SPY " );
# Convert to a DataFrame
data = DataFrame (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 " ])
savefig ( " sp500.png " )