fix: "until" shouldn't be in the future.

part of #11786
This commit is contained in:
Matthias
2025-05-23 07:26:39 +02:00
parent 0ad6a6a951
commit ecdd84efd8

View File

@@ -1790,9 +1790,9 @@ class Exchange:
if (limit := self._ft_has.get("fetch_orders_limit_minutes")) is not None:
orders = []
while since < dt_now():
until = since + timedelta(minutes=limit - 1)
orders += self._fetch_orders(pair, since, params={"until": dt_ts(until)})
since = until
orders += self._fetch_orders(pair, since)
# Since with 1 minute overlap
since = since + timedelta(minutes=limit - 1)
return orders
else: