mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-05-07 06:30:23 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user