simplify Leverage tier code

This commit is contained in:
Matthias
2023-04-17 19:42:41 +02:00
parent 8dbe6b1c16
commit d73e7f292a

View File

@@ -2371,12 +2371,12 @@ class Exchange:
# Must fetch the leverage tiers for each market separately # Must fetch the leverage tiers for each market separately
# * This is slow(~45s) on Okx, makes ~90 api calls to load all linear swap markets # * This is slow(~45s) on Okx, makes ~90 api calls to load all linear swap markets
markets = self.markets markets = self.markets
symbols = []
for symbol, market in markets.items(): symbols = [
symbol for symbol, market in markets.items()
if (self.market_is_future(market) if (self.market_is_future(market)
and market['quote'] == self._config['stake_currency']): and market['quote'] == self._config['stake_currency'])
symbols.append(symbol) ]
tiers: Dict[str, List[Dict]] = {} tiers: Dict[str, List[Dict]] = {}