AlphaVantage.jl

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

AlphaVantage

Build Status

Coverage Status

codecov.io

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, 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

# AlphaVantage.jl is not currently registered as an official package
# Please install the development version from GitHub:
Pkg.clone("git://GitHub.com/ellisvalentiner/AlphaVantage.jl")

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

Usage

using AlphaVantage
using DataFrames
using StatPlots
gr(size=(800,470))
# Get daily S&P 500 data
gspc = time_series_daily("^GSPC", datatype="csv");
# Convert to a DataFrame
data = DataFrame(gspc[2:end, :]);
# Add column names
names!(data, convert.(Symbol, gspc[1,:]));
# Convert timestamp column to Date type
data[:timestamp] = Dates.Date.(data[:timestamp]);
# Plot the timeseries
@df data plot(:timestamp, [:low :high :close], label=["Low" "High" "Close"],
              colour=["#A2A6A5", "#F68E5B", "#B47E6E"], w=2)
savefig("sp500.png")