Skip to content

Commit 857aeaa

Browse files
committed
chore: fix init sequence to avoid risk of "unbound error"
1 parent 3e06971 commit 857aeaa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

freqtrade/exchange/exchange.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@ def __init__(
277277

278278
logger.info(f'Using Exchange "{self.name}"')
279279
self.required_candle_call_count = 1
280+
# Converts the interval provided in minutes in config to seconds
281+
self.markets_refresh_interval: int = (
282+
exchange_conf.get("markets_refresh_interval", 60) * 60 * 1000
283+
)
284+
280285
if validate:
281286
# Initial markets load
282287
self.reload_markets(True, load_leverage_tiers=False)
@@ -286,11 +291,6 @@ def __init__(
286291
self._startup_candle_count, config.get("timeframe", "")
287292
)
288293

289-
# Converts the interval provided in minutes in config to seconds
290-
self.markets_refresh_interval: int = (
291-
exchange_conf.get("markets_refresh_interval", 60) * 60 * 1000
292-
)
293-
294294
if self.trading_mode != TradingMode.SPOT and load_leverage_tiers:
295295
self.fill_leverage_tiers()
296296
self.additional_exchange_init()

0 commit comments

Comments
 (0)