diff --git a/README.md b/README.md index 96c544c..fe8df19 100644 --- a/README.md +++ b/README.md @@ -92,9 +92,7 @@ cryptocompare.get_historical_price_hour('BTC', 'EUR', limit=24, exchange='CCCAGG ```python cryptocompare.get_historical_price_minute('BTC', curr='EUR') cryptocompare.get_historical_price_minute('BTC', curr='EUR', limit=1440) -cryptocompare.get_historical_price_minute('BTC', 'EUR', limit=24, exchange='CCCAGG', toTs=datetime.datetime(2019,6,6,12,59)) -# or -cryptocompare.get_historical_price_minute('BTC', 'EUR', limit=24, exchange='CCCAGG', toTs=datetime.datetime(1559815200)) +cryptocompare.get_historical_price_minute('BTC', 'EUR', limit=24, exchange='CCCAGG', toTs=datetime.datetime.now()) ``` ### Average diff --git a/tests/test_cryptocompare.py b/tests/test_cryptocompare.py index 2555e25..12f2100 100644 --- a/tests/test_cryptocompare.py +++ b/tests/test_cryptocompare.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 - +import time import unittest import cryptocompare import datetime @@ -74,7 +74,7 @@ def test_price_hour(self): def test_price_minute(self): coin = 'BTC' curr = 'USD' - price = cryptocompare.get_historical_price_minute(coin, curr=curr, limit=3, exchange='CCCAGG') + price = cryptocompare.get_historical_price_minute(coin, curr=curr, limit=3, exchange='CCCAGG', toTs=datetime.datetime.now()) for frame in price: self.assertIn('time', frame)