chore: fix init sequence to avoid risk of "unbound error"

This commit is contained in:
Matthias
2025-02-04 19:34:26 +01:00
parent 3e06971038
commit 857aeaa9eb

View File

@@ -277,6 +277,11 @@ class Exchange:
logger.info(f'Using Exchange "{self.name}"')
self.required_candle_call_count = 1
# Converts the interval provided in minutes in config to seconds
self.markets_refresh_interval: int = (
exchange_conf.get("markets_refresh_interval", 60) * 60 * 1000
)
if validate:
# Initial markets load
self.reload_markets(True, load_leverage_tiers=False)
@@ -286,11 +291,6 @@ class Exchange:
self._startup_candle_count, config.get("timeframe", "")
)
# Converts the interval provided in minutes in config to seconds
self.markets_refresh_interval: int = (
exchange_conf.get("markets_refresh_interval", 60) * 60 * 1000
)
if self.trading_mode != TradingMode.SPOT and load_leverage_tiers:
self.fill_leverage_tiers()
self.additional_exchange_init()