diff --git a/freqtrade/data/history/history_utils.py b/freqtrade/data/history/history_utils.py index f1e312426..47c323152 100644 --- a/freqtrade/data/history/history_utils.py +++ b/freqtrade/data/history/history_utils.py @@ -444,7 +444,7 @@ def _download_trades_history( if not trades.empty and since < trades.iloc[-1]["timestamp"]: # Reset since to the last available point # - 5 seconds (to ensure we're getting all trades) - since = trades.iloc[-1]["timestamp"] - (5 * 1000) + since = int(trades.iloc[-1]["timestamp"] - (5 * 1000)) logger.info( f"Using last trade date -5s - Downloading trades for {pair} " f"since: {format_ms_time(since)}." diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index a5a986d1f..797bce034 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -363,7 +363,7 @@ class Binance(Exchange): return {} async def _async_get_trade_history_id_startup( - self, pair: str, since: int | None + self, pair: str, since: int ) -> tuple[list[list], str]: """ override for initial call diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index eec631b68..24656638c 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -2960,7 +2960,7 @@ class Exchange: return trades[-1].get("timestamp") async def _async_get_trade_history_id_startup( - self, pair: str, since: int | None + self, pair: str, since: int ) -> tuple[list[list], str]: """ override for initial trade_history_id call @@ -2968,7 +2968,7 @@ class Exchange: return await self._async_fetch_trades(pair, since=since) async def _async_get_trade_history_id( - self, pair: str, until: int, since: int | None = None, from_id: str | None = None + self, pair: str, *, until: int, since: int, from_id: str | None = None ) -> tuple[str, list[list]]: """ Asynchronously gets trade history using fetch_trades @@ -3022,7 +3022,7 @@ class Exchange: return (pair, trades) async def _async_get_trade_history_time( - self, pair: str, until: int, since: int | None = None + self, pair: str, until: int, since: int ) -> tuple[str, list[list]]: """ Asynchronously gets trade history using fetch_trades, @@ -3063,7 +3063,7 @@ class Exchange: async def _async_get_trade_history( self, pair: str, - since: int | None = None, + since: int, until: int | None = None, from_id: str | None = None, ) -> tuple[str, list[list]]: @@ -3094,7 +3094,7 @@ class Exchange: def get_historic_trades( self, pair: str, - since: int | None = None, + since: int, until: int | None = None, from_id: str | None = None, ) -> tuple[str, list]: