Skip to content

Commit

Permalink
fix: since_ms is mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Feb 2, 2025
1 parent 0181e00 commit 4c5c054
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions freqtrade/data/history/history_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
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

Expand Down
7 changes: 5 additions & 2 deletions freqtrade/rpc/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@
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


Expand Down Expand Up @@ -1460,7 +1461,9 @@ def _rpc_analysed_history_full(
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,
Expand Down

0 comments on commit 4c5c054

Please sign in to comment.