fix: bitget should set margin mode explicitly

Without this, leverage may be set on the wrong margin mode.
the leverage endpoint doesn't allow setting margin mode,
so we must control this manually.
This commit is contained in:
Matthias
2026-04-26 09:05:58 +02:00
parent f17e383157
commit e5f7d0cbb4

View File

@@ -177,12 +177,6 @@ class Bitget(Exchange):
except ccxt.BaseError as e:
raise OperationalException(e) from e
def _lev_prep(self, pair: str, leverage: float, side: BuySell, accept_fail: bool = False):
if self.trading_mode != TradingMode.SPOT:
# Explicitly setting margin_mode is not necessary as marginMode can be set per order.
# self.set_margin_mode(pair, self.margin_mode, accept_fail)
self._set_leverage(leverage, pair, accept_fail)
def _get_params(
self,
side: BuySell,