fix: okxus doesn't support futures trading

This commit is contained in:
Matthias
2025-10-19 08:24:06 +02:00
parent 6a15f0c271
commit a0c4b520fc
3 changed files with 12 additions and 3 deletions

View File

@@ -47,4 +47,4 @@ from freqtrade.exchange.kucoin import Kucoin
from freqtrade.exchange.lbank import Lbank from freqtrade.exchange.lbank import Lbank
from freqtrade.exchange.luno import Luno from freqtrade.exchange.luno import Luno
from freqtrade.exchange.modetrade import Modetrade from freqtrade.exchange.modetrade import Modetrade
from freqtrade.exchange.okx import MyOkx, Okx from freqtrade.exchange.okx import Myokx, Okx, Okxus

View File

@@ -48,7 +48,6 @@ MAP_EXCHANGE_CHILDCLASS = {
"binanceus": "binance", "binanceus": "binance",
"binanceusdm": "binance", "binanceusdm": "binance",
"okex": "okx", "okex": "okx",
"okxus": "okx",
"gateio": "gate", "gateio": "gate",
"huboi": "htx", "huboi": "htx",
} }

View File

@@ -296,7 +296,7 @@ class Okx(Exchange):
return orders return orders
class MyOkx(Okx): class Myokx(Okx):
"""MyOkx exchange class. """MyOkx exchange class.
Minimal adjustment to disable futures trading for the EU subsidiary of Okx Minimal adjustment to disable futures trading for the EU subsidiary of Okx
""" """
@@ -304,3 +304,13 @@ class MyOkx(Okx):
_supported_trading_mode_margin_pairs: list[tuple[TradingMode, MarginMode]] = [ _supported_trading_mode_margin_pairs: list[tuple[TradingMode, MarginMode]] = [
(TradingMode.SPOT, MarginMode.NONE), (TradingMode.SPOT, MarginMode.NONE),
] ]
class Okxus(Okx):
"""Okxus exchange class.
Minimal adjustment to disable futures trading for the US subsidiary of Okx
"""
_supported_trading_mode_margin_pairs: list[tuple[TradingMode, MarginMode]] = [
(TradingMode.SPOT, MarginMode.NONE),
]