Attempt test fix

This commit is contained in:
Matthias 2022-02-15 06:59:10 +01:00
parent 5ee5e0256b
commit 324fdcedb1
2 changed files with 3 additions and 3 deletions

View File

@ -1888,7 +1888,7 @@ class Exchange:
self._leverage_tiers[pair] = pair_tiers self._leverage_tiers[pair] = pair_tiers
def parse_leverage_tier(self, tier) -> Dict: def parse_leverage_tier(self, tier) -> Dict:
info = tier['info'] info = tier.get('info', {})
return { return {
'min': tier['notionalFloor'], 'min': tier['notionalFloor'],
'max': tier['notionalCap'], 'max': tier['notionalCap'],

View File

@ -82,8 +82,8 @@ class Okx(Exchange):
f"Initializing leverage_tiers for {len(symbols)} markets. " f"Initializing leverage_tiers for {len(symbols)} markets. "
"This will take about a minute.") "This will take about a minute.")
for symbol in symbols: for symbol in sorted(symbols):
res = self._api.fetchLeverageTiers(symbol) res = self._api.fetch_leverage_tiers(symbol)
tiers[symbol] = [] tiers[symbol] = []
for tier in res[symbol]: for tier in res[symbol]:
tiers[symbol].append(self.parse_leverage_tier(tier)) tiers[symbol].append(self.parse_leverage_tier(tier))