Use exchange_has to check for ccxt properties

This commit is contained in:
Matthias 2022-02-13 12:48:28 +01:00
parent 8fe3f0c933
commit eaf13f96f7

View File

@ -1856,7 +1856,7 @@ class Exchange:
raise OperationalException(e) from e
def load_leverage_tiers(self) -> Dict[str, List[Dict]]:
if self.trading_mode == TradingMode.FUTURES and self._api.has['fetchLeverageTiers']:
if self.trading_mode == TradingMode.FUTURES and self.exchange_has('fetchLeverageTiers'):
try:
return self._api.fetch_leverage_tiers()
except ccxt.DDoSProtection as e:
@ -2259,7 +2259,7 @@ class Exchange:
:return: (maintenance margin ratio, maintenance amount)
"""
if self._api.has['fetchLeverageTiers']:
if self.exchange_has('fetchLeverageTiers'):
if pair not in self._leverage_tiers:
raise InvalidOrderException(