diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index 30ec3288f..149d824b6 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -33,10 +33,9 @@ class Binance(Exchange): _supported_trading_mode_collateral_pairs: List[Tuple[TradingMode, Collateral]] = [ # TradingMode.SPOT always supported and not required in this list - # TODO-lev: Uncomment once supported # (TradingMode.MARGIN, Collateral.CROSS), # (TradingMode.FUTURES, Collateral.CROSS), - # (TradingMode.FUTURES, Collateral.ISOLATED) + (TradingMode.FUTURES, Collateral.ISOLATED) ] def stoploss_adjust(self, stop_loss: float, order: Dict, side: str) -> bool: diff --git a/freqtrade/exchange/ftx.py b/freqtrade/exchange/ftx.py index e28c6bc45..e22281faf 100644 --- a/freqtrade/exchange/ftx.py +++ b/freqtrade/exchange/ftx.py @@ -27,6 +27,7 @@ class Ftx(Exchange): _supported_trading_mode_collateral_pairs: List[Tuple[TradingMode, Collateral]] = [ # TradingMode.SPOT always supported and not required in this list + # TODO-lev: Uncomment once supported # (TradingMode.MARGIN, Collateral.CROSS), # (TradingMode.FUTURES, Collateral.CROSS) ] diff --git a/freqtrade/exchange/gateio.py b/freqtrade/exchange/gateio.py index fe4227d80..203aa735b 100644 --- a/freqtrade/exchange/gateio.py +++ b/freqtrade/exchange/gateio.py @@ -31,7 +31,7 @@ class Gateio(Exchange): # TradingMode.SPOT always supported and not required in this list # (TradingMode.MARGIN, Collateral.CROSS), # (TradingMode.FUTURES, Collateral.CROSS), - # (TradingMode.FUTURES, Collateral.ISOLATED) + (TradingMode.FUTURES, Collateral.ISOLATED) ] def validate_ordertypes(self, order_types: Dict) -> None: diff --git a/tests/exchange/test_exchange.py b/tests/exchange/test_exchange.py index 0ac7a6130..b529af47f 100644 --- a/tests/exchange/test_exchange.py +++ b/tests/exchange/test_exchange.py @@ -3442,26 +3442,24 @@ def test_set_margin_mode(mocker, default_conf, collateral): # TODO-lev: Remove once implemented ("binance", TradingMode.MARGIN, Collateral.CROSS, True), ("binance", TradingMode.FUTURES, Collateral.CROSS, True), - ("binance", TradingMode.FUTURES, Collateral.ISOLATED, True), ("kraken", TradingMode.MARGIN, Collateral.CROSS, True), ("kraken", TradingMode.FUTURES, Collateral.CROSS, True), ("ftx", TradingMode.MARGIN, Collateral.CROSS, True), ("ftx", TradingMode.FUTURES, Collateral.CROSS, True), ("gateio", TradingMode.MARGIN, Collateral.CROSS, True), ("gateio", TradingMode.FUTURES, Collateral.CROSS, True), - ("gateio", TradingMode.FUTURES, Collateral.ISOLATED, True), # TODO-lev: Uncomment once implemented # ("binance", TradingMode.MARGIN, Collateral.CROSS, False), # ("binance", TradingMode.FUTURES, Collateral.CROSS, False), - # ("binance", TradingMode.FUTURES, Collateral.ISOLATED, False), + ("binance", TradingMode.FUTURES, Collateral.ISOLATED, False), # ("kraken", TradingMode.MARGIN, Collateral.CROSS, False), # ("kraken", TradingMode.FUTURES, Collateral.CROSS, False), # ("ftx", TradingMode.MARGIN, Collateral.CROSS, False), # ("ftx", TradingMode.FUTURES, Collateral.CROSS, False), # ("gateio", TradingMode.MARGIN, Collateral.CROSS, False), # ("gateio", TradingMode.FUTURES, Collateral.CROSS, False), - # ("gateio", TradingMode.FUTURES, Collateral.ISOLATED, False), + ("gateio", TradingMode.FUTURES, Collateral.ISOLATED, False), ]) def test_validate_trading_mode_and_collateral( default_conf,