Fix error if until is undefined

This commit is contained in:
Joe Schr
2024-02-08 11:06:15 +01:00
parent 2925a2a2fa
commit 0647ce59e7

View File

@@ -2666,7 +2666,7 @@ class Exchange:
pair, params={self._trades_pagination_arg: from_id})
if t:
trades.extend(t[x])
if from_id == from_id_next or t[-1][0] > until:
if from_id == from_id_next or (until and t[-1][0] > until):
logger.debug(f"Stopping because from_id did not change. "
f"Reached {t[-1][0]} > {until}")
# Reached the end of the defined-download period - add last trade as well.