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