diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index 231dc1a95..d23f84e7b 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -2,7 +2,7 @@ import json import logging from pathlib import Path -from typing import Any, Dict, List, Optional, Tuple +from typing import Dict, List, Optional, Tuple import arrow import ccxt @@ -38,12 +38,6 @@ class Binance(Exchange): # (TradingMode.FUTURES, Collateral.ISOLATED) # TODO-lev: Uncomment once supported ] - def __init__(self, config: Dict[str, Any], validate: bool = True) -> None: - super().__init__(config, validate) - self._leverage_brackets: Dict = {} - if self.trading_mode != TradingMode.SPOT: - self.fill_leverage_brackets() - @property def _ccxt_config(self) -> Dict: # Parameters to add directly to ccxt sync/async initialization. diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index ad74fa0c1..de9711ddd 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -179,6 +179,10 @@ class Exchange: self.markets_refresh_interval: int = exchange_config.get( "markets_refresh_interval", 60) * 60 + self._leverage_brackets: Dict = {} + if self.trading_mode != TradingMode.SPOT: + self.fill_leverage_brackets() + def __del__(self): """ Destructor - clean up async stuff @@ -1635,7 +1639,7 @@ class Exchange: """ Assigns property _leverage_brackets to a dictionary of information about the leverage allowed on each pair - Not used by most exchanges, only used by Binance at time of writing + Not used if the exchange has a static max leverage value for the account or each pair """ return