A work in progress Julia wrapper for the Alpaca Markets API.
Access Alpaca Markets market data API to retrieve stock and crypto market data.
AlpacaMarkets.jl is in the General Registry so you can simply install locally using Pkg.
You need to sign up to AlpacaMarkets to obtain your API keys. Once you've obtained the key and secret you can authenticate manually with
using AlpacaMarkets
AlpacaMarkets.auth(KEY, SECRET)
Rather than setting it manually each time I recommend you add it to your .julia/startup.jl
or '.julia/config/startup.jl'
ENV["ALPACA_KEY"] = KEY
ENV["ALPACA_SECRET"] = SECRET
This is automatically be picked up by AlpacaMarkets.jl each time you start Julia.
All the historical market data API functions are available:
stock_bars
,stock_quotes
andstock_trades
crypto_bars
,crypto_quotes
andcrypto_trades
Plus the interface to their news API
news
Plus I've added helper functions to obtain data between two periods:
get_stock_quotes
andget_stock_trades
get_crypto_trades
So you can pull some historical data as and when needed.
- Integrate Trading API
- Equity Market Data - https://dm13450.github.io/2022/03/22/AlpacaMarkets.jl-More-Free-Data.html
- Crypto Market Data
- News Data