mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
added exception handlers to fetch_market_leverage_tiers
This commit is contained in:
parent
421aa31c92
commit
c7e87e86e2
|
@ -1905,8 +1905,18 @@ class Exchange:
|
|||
"This will take about a minute.")
|
||||
|
||||
for symbol in sorted(symbols):
|
||||
res = self._api.fetch_market_leverage_tiers(symbol)
|
||||
tiers[symbol] = res[symbol]
|
||||
try:
|
||||
res = self._api.fetch_market_leverage_tiers(symbol)
|
||||
tiers[symbol] = res[symbol]
|
||||
except ccxt.DDoSProtection as e:
|
||||
raise DDosProtection(e) from e
|
||||
except (ccxt.NetworkError, ccxt.ExchangeError) as e:
|
||||
raise TemporaryError(
|
||||
f'Could not load leverage tiers for {symbol}'
|
||||
f' due to {e.__class__.__name__}. Message: {e}'
|
||||
) from e
|
||||
except ccxt.BaseError as e:
|
||||
raise OperationalException(e) from e
|
||||
logger.info(f"Done initializing {len(symbols)} markets.")
|
||||
|
||||
return tiers
|
||||
|
|
Loading…
Reference in New Issue
Block a user