Skip to content

Commit 2236b08

Browse files
committed
refactor: improved exchange init sequence
1 parent 24f904e commit 2236b08

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

freqtrade/exchange/exchange.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@ def __init__(
199199
self.loop = self._init_async_loop()
200200
self._config: Config = {}
201201

202-
self._config.update(config)
203-
204202
# Leverage properties
205203
self.trading_mode: TradingMode = TradingMode(
206204
config.get("trading_mode", self._supported_trading_mode_margin_pairs[0][0])
@@ -213,6 +211,7 @@ def __init__(
213211
config["trading_mode"] = self.trading_mode
214212
config["margin_mode"] = self.margin_mode
215213
config["candle_type_def"] = CandleType.get_default(self.trading_mode)
214+
self._config.update(config)
216215
self.liquidation_buffer = config.get("liquidation_buffer", 0.05)
217216

218217
exchange_conf: ExchangeConfig = exchange_config if exchange_config else config["exchange"]

0 commit comments

Comments
 (0)