Skip to content

Commit

Permalink
Minor fix in README and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
duppie4000 committed Feb 20, 2020
1 parent a82e28f commit bee1d84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cryptocompare.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3

import time
import unittest
import cryptocompare
import datetime
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit bee1d84

Please sign in to comment.