diff options
author | loit <michael.foiani@gmail.com> | 2025-07-31 16:04:58 -0400 |
---|---|---|
committer | loit <michael.foiani@gmail.com> | 2025-07-31 16:04:58 -0400 |
commit | b832d364da8c2efe09e3f75828caf73c50d01ce3 (patch) | |
tree | 383074acc1936848a87c22a0d212117bb2e13d13 /api.py | |
parent | 6d558749b7bff9250b9f9f48fa4eeb492d231c22 (diff) |
run batch code to produce some backtesting results
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 |