Closed nickthorpie closed 2 years ago
Hi @nickthorpie
I am not a part of the team and don't have much time to send a pull request.
Here is the quick solution
go to: fastquant/data/crypto/crypto.py
then change the time format.
#dt = datetime.strptime(date, "%Y-%m-%d")
dt = datetime.strptime(date, "%Y-%m-%d %H:%M:%S")
#request_start_date_epoch = unix_time_millis(pd.to_datetime(request_start_date_epoch, unit="ms").strftime('%Y-%m-%d'))
request_start_date_epoch = unix_time_millis(pd.to_datetime(request_start_date_epoch, unit="ms").strftime('%Y-%m-%d %H:%M:%S'))
Hope it helps.
Fixed with recent PR https://github.com/enzoampil/fastquant/pull/396
Is your feature request related to a problem? Please describe. I would like to be able to run analysis on hourly data because I'm testing strategies for young cryptos.
Describe the solution you'd like The solution takes no more than a minute. I've worked around it on my computer by fastquant.py: line 544: get_crypto_data(ticker, start_date, end_date,granularity = "1d"): and line 552: ohlcv_lol = binance.fetch_ohlcv(ticker, granularity, since=start_date_epoch)