AlphaVantage.jl

A Julia wrapper for the Alpha Vantage API.
Author ellisvalentiner
Popularity
39 Stars
Updated Last
6 Months Ago
Started In
October 2017

AlphaVantage

Build Status codecov.io Coverage Status

A Julia wrapper for the Alpha Vantage API.

Overview

This package is a Julia wrapper for the Alpha Vantage API. Alpha Vantage provides free realtime and historical data for equities, physical currencies, 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.

Installation

Pkg.add("AlphaVantage")

and once you have obtained your API key pass it to the client as follows:.

using AlphaVantage
AlphaVantage.global_key!("YOURKEY")

or set it as an environment variable

export ALPHA_VANTAGE_API_KEY=YOURKEY

and check that it is set using:

using AlphaVantage
AlphaVantage.GLOBAL[]

If you encounter a clear bug, please file a minimal reproducible example on GitHub.

Features

  • Intraday prices for stocks, currencies and cryptocurrencies.
  • Daily, weekly and monthly prices for stocks, currencies and cryptocurrencies.
  • Technical indicators for stock prices.
  • Crypto currency health index from Flipside Crypto.
  • Fundamental data for stocks.

Usage

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")

Used By Packages

No packages found.