santiment / sanpy

Santiment API Python Client
MIT License
94 stars 29 forks source link

fix default to_date to be the end of the day #39

Closed tspenov closed 5 years ago

tspenov commented 5 years ago

to_date=2018-10-29 defaults to 2018-10-29T00:00:00. It will be better to default to 2018-10-29T23:59:59 so it returns all the data for the day.

san.get('transaction_volume/omisego', from_date='2018-10-28', to_date='2018-10-29')
                           transactionVolume
datetime
2018-10-28 00:00:00+00:00       3.226938e+05
2018-10-29 00:00:00+00:00       1.281221e+03
>>> san.get('transaction_volume/omisego', from_date='2018-10-28', to_date='2018-10-29T00:00:00')
                           transactionVolume
datetime
2018-10-28 00:00:00+00:00      322693.810945
2018-10-29 00:00:00+00:00        1281.220900
san.get('transaction_volume/omisego', from_date='2018-10-28', to_date='2018-10-29T23:59:59')
                           transactionVolume
datetime
2018-10-28 00:00:00+00:00       3.226938e+05
2018-10-29 00:00:00+00:00       9.269391e+05