From 4c5c054bcae0f05693a29b85507aef3ec065a3bd Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 2 Feb 2025 14:33:45 +0100 Subject: [PATCH] fix: since_ms is mandatory --- freqtrade/data/history/history_utils.py | 3 +-- freqtrade/rpc/rpc.py | 7 +++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/freqtrade/data/history/history_utils.py b/freqtrade/data/history/history_utils.py index 47c323152..806fd49da 100644 --- a/freqtrade/data/history/history_utils.py +++ b/freqtrade/data/history/history_utils.py @@ -18,8 +18,7 @@ from freqtrade.enums import CandleType, TradingMode from freqtrade.exceptions import OperationalException from freqtrade.exchange import Exchange from freqtrade.plugins.pairlist.pairlist_helpers import dynamic_expand_pairlist -from freqtrade.util import dt_now, dt_ts, format_ms_time -from freqtrade.util.datetime_helpers import format_ms_time_det +from freqtrade.util import dt_now, dt_ts, format_ms_time, format_ms_time_det from freqtrade.util.migrations import migrate_data from freqtrade.util.progress_tracker import CustomProgress, retrieve_progress_tracker diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index c606f07b1..21ca0b081 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -42,12 +42,13 @@ from freqtrade.rpc.rpc_types import RPCSendMsg from freqtrade.util import ( decimals_per_coin, dt_from_ts, + dt_humanize_delta, dt_now, + dt_ts, dt_ts_def, format_date, shorten_date, ) -from freqtrade.util.datetime_helpers import dt_humanize_delta from freqtrade.wallets import PositionWallet, Wallet @@ -1460,7 +1461,9 @@ class RPC: data = exchange.get_historic_ohlcv( pair=pair, timeframe=timeframe, - since_ms=timerange_parsed.startts * 1000 if timerange_parsed.startts else None, + since_ms=timerange_parsed.startts * 1000 + if timerange_parsed.startts + else dt_ts(dt_now() - timedelta(days=30)), is_new_pair=True, # history is never available - so always treat as new pair candle_type=config.get("candle_type_def", CandleType.SPOT), until_ms=timerange_parsed.stopts,