trimmed down get_maintenance_ratio_and_amt, now requires fetchLeverageTiers
This commit is contained in:
parent
e7430da5d7
commit
8657e99c26
@ -2295,16 +2295,7 @@ class Exchange:
|
|||||||
# The lowest notional_floor for any pair in fetch_leverage_tiers is always 0 because it
|
# 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
|
# describes the min amt for a tier, and the lowest tier will always go down to 0
|
||||||
else:
|
else:
|
||||||
if pair not in self.markets:
|
raise OperationalException(f"Cannot get maintenance ratio using {self.name}")
|
||||||
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)
|
|
||||||
|
|
||||||
|
|
||||||
def is_exchange_known_ccxt(exchange_name: str, ccxt_module: CcxtModuleType = None) -> bool:
|
def is_exchange_known_ccxt(exchange_name: str, ccxt_module: CcxtModuleType = None) -> bool:
|
||||||
|
Loading…
Reference in New Issue
Block a user