Accept "insufficient funds" error on set_leverage from stop calls

closes #8341
This commit is contained in:
Matthias
2023-03-21 19:29:27 +01:00
parent ebebcb886c
commit 8cf3e9f91b
3 changed files with 7 additions and 7 deletions

View File

@@ -125,7 +125,7 @@ class Okx(Exchange):
return params
@retrier
def _lev_prep(self, pair: str, leverage: float, side: BuySell):
def _lev_prep(self, pair: str, leverage: float, side: BuySell, accept_fail: bool = False):
if self.trading_mode != TradingMode.SPOT and self.margin_mode is not None:
try:
res = self._api.set_leverage(