feat: disable myOkx futures support

it's a product that doesn't exist.
This commit is contained in:
Matthias
2025-08-03 17:38:15 +02:00
parent 35456a1f32
commit 0c0f2e43e8
3 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -46,4 +46,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 Okx from freqtrade.exchange.okx import MyOkx, Okx
+1 -1
View File
@@ -49,7 +49,6 @@ MAP_EXCHANGE_CHILDCLASS = {
"binanceje": "binance", "binanceje": "binance",
"binanceusdm": "binance", "binanceusdm": "binance",
"okex": "okx", "okex": "okx",
"myokx": "okx",
"okxus": "okx", "okxus": "okx",
"gateio": "gate", "gateio": "gate",
"huboi": "htx", "huboi": "htx",
@@ -65,6 +64,7 @@ SUPPORTED_EXCHANGES = [
"hyperliquid", "hyperliquid",
"kraken", "kraken",
"okx", "okx",
"myokx",
] ]
# either the main, or replacement methods (array) is required # either the main, or replacement methods (array) is required
+11
View File
@@ -287,3 +287,14 @@ class Okx(Exchange):
orders_open = self._api.fetch_open_orders(pair, since=since_ms) orders_open = self._api.fetch_open_orders(pair, since=since_ms)
orders.extend(orders_open) orders.extend(orders_open)
return orders return orders
class MyOkx(Okx):
"""
MyOkx exchange class.
Minimal adjustment to disable futures trading for the EU subsidiary of Okx
"""
_supported_trading_mode_margin_pairs: list[tuple[TradingMode, MarginMode]] = [
(TradingMode.SPOT, MarginMode.NONE),
]