mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-09-20 09:31:12 +00:00
Simplify okx lev_prep
This commit is contained in:
parent
5791d0a394
commit
14f9d712dc
|
@ -58,11 +58,7 @@ class Okx(Exchange):
|
|||
leverage: float,
|
||||
side: str # buy or sell
|
||||
):
|
||||
if self.trading_mode != TradingMode.SPOT:
|
||||
if self.margin_mode is None:
|
||||
raise OperationalException(
|
||||
f"{self.name}.margin_mode must be set for {self.trading_mode.value}"
|
||||
)
|
||||
if self.trading_mode != TradingMode.SPOT and self.margin_mode is not None:
|
||||
try:
|
||||
# TODO-lev: Test me properly (check mgnMode passed)
|
||||
self._api.set_leverage(
|
||||
|
|
Loading…
Reference in New Issue
Block a user