def test_top_100(self): cur = Current(TestCoinsta.k, currency='usd') top_100 = cur.top_100() size_cols = len(top_100.columns) self.assertEqual(size_cols, 20)
def test_top_100(self): top_100 = Current.top_100() no_cols = len(top_100.columns) self.assertEqual(no_cols, 9)
# another alternative method for "/" formatted date strings other_spec = Historical.from_strings('btc', '2018/3/1', '2018/6/1', hyphen=False) another_btc = other_spec.get_data() print(another_btc.head()) # get current market information on a specified crypto btc_current = cur.get_current('btc') print(btc_current) # get the top 100 cryptos (in terms of market cap) current_100 = cur.top_100() 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')