From 8657e99c269e45198480dec46f39d0c5c596482e Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Fri, 11 Feb 2022 06:38:57 -0600 Subject: [PATCH] trimmed down get_maintenance_ratio_and_amt, now requires fetchLeverageTiers --- freqtrade/exchange/exchange.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 86da18017..650df12d0 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -2295,16 +2295,7 @@ class Exchange: # The lowest notional_floor for any pair in fetch_leverage_tiers is always 0 because it # describes the min amt for a tier, and the lowest tier will always go down to 0 else: - if pair not in self.markets: - raise InvalidOrderException( - f"{pair} is not tradeable on {self.name} {self.trading_mode.value}" - ) - mmr = self.markets[pair]['maintenanceMarginRate'] - if mmr is None: - raise InvalidOrderException( - f"Maintenance margin rate for {pair} is unavailable for {self.name}" - ) - return (mmr, None) + raise OperationalException(f"Cannot get maintenance ratio using {self.name}") def is_exchange_known_ccxt(exchange_name: str, ccxt_module: CcxtModuleType = None) -> bool: