Skip to content

Commit a0c4b52

Browse files
committed
fix: okxus doesn't support futures trading
1 parent 6a15f0c commit a0c4b52

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

freqtrade/exchange/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@
4747
from freqtrade.exchange.lbank import Lbank
4848
from freqtrade.exchange.luno import Luno
4949
from freqtrade.exchange.modetrade import Modetrade
50-
from freqtrade.exchange.okx import MyOkx, Okx
50+
from freqtrade.exchange.okx import Myokx, Okx, Okxus

freqtrade/exchange/common.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def _get_logging_mixin():
4848
"binanceus": "binance",
4949
"binanceusdm": "binance",
5050
"okex": "okx",
51-
"okxus": "okx",
5251
"gateio": "gate",
5352
"huboi": "htx",
5453
}

freqtrade/exchange/okx.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,21 @@ def _fetch_orders_emulate(self, pair: str, since_ms: int) -> list[CcxtOrder]:
296296
return orders
297297

298298

299-
class MyOkx(Okx):
299+
class Myokx(Okx):
300300
"""MyOkx exchange class.
301301
Minimal adjustment to disable futures trading for the EU subsidiary of Okx
302302
"""
303303

304304
_supported_trading_mode_margin_pairs: list[tuple[TradingMode, MarginMode]] = [
305305
(TradingMode.SPOT, MarginMode.NONE),
306306
]
307+
308+
309+
class Okxus(Okx):
310+
"""Okxus exchange class.
311+
Minimal adjustment to disable futures trading for the US subsidiary of Okx
312+
"""
313+
314+
_supported_trading_mode_margin_pairs: list[tuple[TradingMode, MarginMode]] = [
315+
(TradingMode.SPOT, MarginMode.NONE),
316+
]

0 commit comments

Comments
 (0)