Loading...

Accessing Kraken API Data With Python

This is a tutorial for how to download market data from the Kraken exchange via their public REST API. (*Please note that Kraken's API has terms of service and market data usage that may have restrictions not covered here, and so you should consult with Kraken directly if you have any questions concerning their API - this tutorial is not officially endorsed by Kraken, and CDD is not affiliated with the Kraken exchange. This tutorial should be used for your informational purposes*).


The source below can be found at this link, and is shown in full below. The script runs by passing a cryptocurrency pair to the function(s). For the OHLC timeseries, it requires a timeframe to be set (documented below). There other two functions will retrieve Spread data (bid/ask spread), and historical trade prints. For these, you only need to pass a pair in the format: "BTC/USD".

Follow Us
Drop us your email to receive new risk postings