fix: live pair data must respect end-date

This commit is contained in:
Matthias
2026-05-18 18:25:14 +02:00
parent 9c480b4f4d
commit f645d3e21a
+4 -1
View File
@@ -1694,8 +1694,11 @@ class RPC:
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,
until_ms=timerange_parsed.stopts * 1000 if timerange_parsed.stopts else None,
)
if timerange_parsed.stopts and len(data) > 1:
# trim last candle if it is newer than the stop time
data = data.loc[data["date"] <= timerange_parsed.stopdt]
else:
_data = load_data(
datadir=config["datadir"],