From 18b4d0be955e291ac862d7ac44b72d7858b70e79 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Mon, 7 Feb 2022 04:43:19 -0600 Subject: [PATCH] fixed error with exchange.fill_leverage_tiers --- freqtrade/exchange/binance.py | 6 ++---- freqtrade/exchange/exchange.py | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index 97a2fc574..d25a6a38f 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -252,12 +252,10 @@ class Binance(Exchange): Path(__file__).parent / 'binance_leverage_tiers.json' ) with open(leverage_tiers_path) as json_file: - leverage_tiers = json.load(json_file) - return leverage_tiers + return json.load(json_file) else: try: - leverage_tiers = self._api.fetch_leverage_tiers() - return leverage_tiers + return self._api.fetch_leverage_tiers() except ccxt.DDoSProtection as e: raise DDosProtection(e) from e except (ccxt.NetworkError, ccxt.ExchangeError) as e: diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 2608b45a6..8c584e177 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1880,10 +1880,10 @@ class Exchange: """ leverage_tiers = self.load_leverage_tiers() for pair, tiers in leverage_tiers.items(): - tiers = [] + pair_tiers = [] for tier in tiers: - tiers.append(self.parse_leverage_tier(tier)) - self._leverage_tiers[pair] = tiers + pair_tiers.append(self.parse_leverage_tier(tier)) + self._leverage_tiers[pair] = pair_tiers def parse_leverage_tier(self, tier) -> Dict: info = tier['info']