Attempt test fix
This commit is contained in:
parent
5ee5e0256b
commit
324fdcedb1
@ -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'],
|
||||||
|
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user