From 324fdcedb1bf36ecef37a6bff5d4a518cd355975 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 15 Feb 2022 06:59:10 +0100 Subject: [PATCH] Attempt test fix --- freqtrade/exchange/exchange.py | 2 +- freqtrade/exchange/okx.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 55c75ca0a..646425b9a 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1888,7 +1888,7 @@ class Exchange: self._leverage_tiers[pair] = pair_tiers def parse_leverage_tier(self, tier) -> Dict: - info = tier['info'] + info = tier.get('info', {}) return { 'min': tier['notionalFloor'], 'max': tier['notionalCap'], diff --git a/freqtrade/exchange/okx.py b/freqtrade/exchange/okx.py index c933153f5..833e3cc09 100644 --- a/freqtrade/exchange/okx.py +++ b/freqtrade/exchange/okx.py @@ -82,8 +82,8 @@ class Okx(Exchange): f"Initializing leverage_tiers for {len(symbols)} markets. " "This will take about a minute.") - for symbol in symbols: - res = self._api.fetchLeverageTiers(symbol) + for symbol in sorted(symbols): + res = self._api.fetch_leverage_tiers(symbol) tiers[symbol] = [] for tier in res[symbol]: tiers[symbol].append(self.parse_leverage_tier(tier))