CryptoCompare API Quick Start Guide

Alex Galea
Aug 28, 2017 · 2 min read

This is the best way to get intraday trading data for cryptocurrencies. I’ll run run through the most useful API functions to get current and historical intraday prices (OHLCV) on the hourly and minute time frames!

Last updated: August 2017

Source Code

Check out the full code in this IPython notebook. I use these packages —

import requests
import datetime
import pandas as pd
import matplotlib.pyplot as plt

Live Coin Prices

Daily Historical Price (OHLCV)

Using the default arguments, this function will return the entirety of the available price history. To specify a row limit, pass all_data=False and use the limit parameter.

Hourly Historical Price (OHLCV)

Using a bar width of 1 hour
Using a bin width of 24 hours

Historical Price by Minute (OHLCV)

Coin List

Lists out each coin (as of 2017–08 there are > 1400) and gives various details such as metrics related to the mining protocol.

It’s important to extract the Id for each coin to use in the following API calls.

symbol_id_dict = {symb: int(d['Id']) for symb, d in data.items()}

Live Coin Information

Live Social Status

Conclusion

It’s pretty amazing that all this data is available through an API. Wonderful work by the people at https://www.cryptocompare.com/

Thanks for reading! If anything’s changed since I last updated this, please send me a message on twitter @agalea91

)

Alex Galea

Written by

Senior Data Analyst, MSc. Physics

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade