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

View File

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

View File

@@ -49,7 +49,6 @@ MAP_EXCHANGE_CHILDCLASS = {
"binanceje": "binance",
"binanceusdm": "binance",
"okex": "okx",
"myokx": "okx",
"okxus": "okx",
"gateio": "gate",
"huboi": "htx",
@@ -65,6 +64,7 @@ SUPPORTED_EXCHANGES = [
"hyperliquid",
"kraken",
"okx",
"myokx",
]
# either the main, or replacement methods (array) is required

View File

@@ -287,3 +287,14 @@ class Okx(Exchange):
orders_open = self._api.fetch_open_orders(pair, since=since_ms)
orders.extend(orders_open)
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),
]