Merge branch 'leverage-tiers' of https://github.com/samgermain/freqtrade into leverage-tiers

This commit is contained in:
Sam Germain
2022-02-14 17:36:47 -06:00
4 changed files with 15 additions and 9 deletions

View File

@@ -77,11 +77,17 @@ class Okx(Exchange):
tiers: Dict[str, List[Dict]] = {}
# Be verbose here, as this delays startup by ~1 minute.
logger.info(
f"Initializing leverage_tiers for {len(symbols)} markets. "
"This will take about a minute.")
for symbol in symbols:
res = self._api.fetchLeverageTiers(symbol)
tiers[symbol] = []
for tier in res[symbol]:
tiers[symbol].append(self.parse_leverage_tier(tier))
logger.info(f"Done initializing {len(symbols)} markets.")
return tiers
else: