mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Use get_historic_trades
directly
This commit is contained in:
parent
aab3c07b87
commit
71e36be34b
|
@ -2242,10 +2242,10 @@ class Exchange:
|
|||
# since_ms = 1698060269000
|
||||
# from_id = None
|
||||
# TODO: /DEBUG
|
||||
[ticks_pair, new_ticks] = self._download_trades_history(pair,
|
||||
since=since_ms if since_ms else first_candle_ms, # noqa
|
||||
until=until,
|
||||
from_id=from_id)
|
||||
[ticks_pair, new_ticks] = self.get_historic_trades(pair,
|
||||
since=since_ms if since_ms else first_candle_ms, # noqa
|
||||
until=until,
|
||||
from_id=from_id)
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Refreshing TRADES data for {pair} failed")
|
||||
|
@ -2590,31 +2590,6 @@ class Exchange:
|
|||
pass
|
||||
return self.loop.run_until_complete(task)
|
||||
|
||||
def _download_trades_history(self,
|
||||
pair: str,
|
||||
*,
|
||||
new_pairs_days: int = 30,
|
||||
since: Optional[int] = None,
|
||||
until: Optional[int] = None,
|
||||
from_id: Optional[str] = None,
|
||||
stop_on_from_id: Optional[bool] = False
|
||||
) -> Tuple[str, List]:
|
||||
|
||||
"""
|
||||
Download trade history from the exchange.
|
||||
Appends to previously downloaded trades data.
|
||||
:param until: is in msecs
|
||||
:param since: is in msecs
|
||||
:return Boolean of success
|
||||
"""
|
||||
|
||||
new_trades = self.get_historic_trades(pair=pair,
|
||||
since=since,
|
||||
until=until,
|
||||
from_id=from_id,
|
||||
stop_on_from_id=stop_on_from_id)
|
||||
return new_trades
|
||||
|
||||
@retrier
|
||||
def _get_funding_fees_from_exchange(self, pair: str, since: Union[datetime, int]) -> float:
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user