Skip to content

Instantly share code, notes, and snippets.

@the023
Created December 28, 2017 10:18
Show Gist options
  • Select an option

  • Save the023/2a8a9381982cfe28f770e6fc52d5b716 to your computer and use it in GitHub Desktop.

Select an option

Save the023/2a8a9381982cfe28f770e6fc52d5b716 to your computer and use it in GitHub Desktop.
import pandas as pd
import matplotlib.pyplot as plt
import ccxt
ex = ccxt.gdax()
response = ex.fetch_ohlcv(symbol='BTC/USD', timeframe='1h')
columns = ['mts', 'open', 'high', 'low', 'close', 'volume']
df = pd.DataFrame(response, columns=columns).set_index('mts')
df.plot()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment