Beispiel #1
0
 def test_historical_snapshot(self):
     snap_date = date(2018, 7, 29)
     july_2018 = HistoricalSnapshot(snap_date)
     july_2018_snapshot = july_2018.get_snapshot()
     len_july_2018 = len(july_2018_snapshot.columns)
     self.assertEqual(len_july_2018, 10)
Beispiel #2
0
print(current_100.head())

# get global overview of crypto markets
glo_info = cur.global_info()
print(glo_info)

# Historical Snapshot
snap_period = date(2013, 4, 28)
early_2013 = HistoricalSnapshot(snap_period).get_snapshot()
print(early_2013.info())

early_2013 = HistoricalSnapshot.from_strings('2013/4/28', hyphen=False)
print(early_2013.info())

early_2013 = HistoricalSnapshot.from_strings('2013-4-28')
print(early_2013.info())

print(Historical(ticker='btc', start=date(2016, 1, 2)))

snap_date = date(2018, 7, 29)
july_2018 = HistoricalSnapshot(snap_date)
july_2018_snapshot = july_2018.get_snapshot()
print(july_2018_snapshot.info())

fake_date = date(1999, 1, 1)
fake_data = HistoricalSnapshot(fake_date).get_snapshot()
print(fake_data.info())

july_2018 = HistoricalSnapshot.from_strings('2018-7-29')
print(len(july_2018.columns))