mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Fix end-reached for id-based trade-download
This commit is contained in:
parent
2c0bb71a6e
commit
57dee794d1
|
@ -812,13 +812,15 @@ class Exchange:
|
|||
t = await self._async_fetch_trades(pair,
|
||||
params={self._trades_pagination_arg: from_id})
|
||||
if len(t):
|
||||
from_id = t[-1]['id']
|
||||
# TODO: eliminate duplicates (first trade = last from previous)
|
||||
trades.extend(t)
|
||||
# Reached the end of the defined-download period
|
||||
if until and t[-1]['timestamp'] > until:
|
||||
if from_id == t[-1]['id'] or (until and t[-1]['timestamp'] > until):
|
||||
print(f"from_id did not change.")
|
||||
print(f"Reached {t[-1]['timestamp']} > {until}")
|
||||
break
|
||||
|
||||
# TODO: eliminate duplicates (first trade = last from previous)
|
||||
# Reached the end of the defined-download period
|
||||
from_id = t[-1]['id']
|
||||
else:
|
||||
break
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user