diff options
Diffstat (limited to 'api.py')
-rw-r--r-- | api.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -75,10 +75,12 @@ If bad request, returns the previous chart. """ def fetch_chart_data_backtest(ticker='XRP/USD', interval='1Min', period_end_date=None, period_length=None): if period_end_date == None: - period_end_date = datetime.now().astimezone(pytz.timezone('UTC')) + period_end_date = datetime.now() if period_length == None: period_length = timedelta(days=5) + period_end_date = period_end_date.astimezone(pytz.timezone('UTC')) + # cast to int to truncate the decimal period2 = datetime.isoformat(period_end_date) # find the first period via subtracting the period length |