Skip to content

Commit 8391a06

Browse files
committed
chore: use ccxt's "set_markets_from_exchange" instead of manual logic
1 parent 68c00d1 commit 8391a06

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

freqtrade/exchange/exchange.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,12 +692,13 @@ def reload_markets(self, force: bool = False, *, load_leverage_tiers: bool = Tru
692692
# Reload async markets, then assign them to sync api
693693
retrier(self._load_async_markets, retries=retries)(reload=True)
694694
self._markets = self._api_async.markets
695-
self._api.set_markets(self._api_async.markets, self._api_async.currencies)
695+
self._api.set_markets_from_exchange(self._api_async)
696696
# Assign options array, as it contains some temporary information from the exchange.
697+
# TODO: investigate with ccxt if it's safe to remove `.options`
697698
self._api.options = self._api_async.options
698699
if self._exchange_ws:
699700
# Set markets to avoid reloading on websocket api
700-
self._ws_async.set_markets(self._api.markets, self._api.currencies)
701+
self._ws_async.set_markets_from_exchange(self._api_async)
701702
self._ws_async.options = self._api.options
702703
self._last_markets_refresh = dt_ts()
703704

0 commit comments

Comments
 (0)