In [20]:
import requests
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

In [21]:
start = '2010-07-17'
end   = '2018-01-01'
url   = 'https://api.coindesk.com/v1/bpi/historical/close.json?start=' + start + '&end=' + end

model = requests.get(url).json()

In [22]:
bpi = { 'bpi': model['bpi'] }

In [24]:
df = pd.DataFrame(bpi)

In [29]:
_ = df.plot()

plt.tight_layout()
plt.show()



In [ ]: