Fix OKX spot swap tgtCcy and show options trading USDT in header.

OKX requires quote_ccy/base_ccy for market orders; include trading_usdt in balance display and total funds.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-12 08:42:33 +08:00
parent 04fd84757c
commit 551c86264a
8 changed files with 70 additions and 11 deletions
@@ -103,6 +103,7 @@ def total_funds_usdt(
options_trading_usdc: float | None = None,
options_funding_usdc: float | None = None,
options_funding_usdt: float | None = None,
options_trading_usdt: float | None = None,
) -> float | None:
if funding_usdt is None:
return None
@@ -114,6 +115,8 @@ def total_funds_usdt(
total += float(options_funding_usdt)
if options_trading_usdc is not None:
total += float(options_trading_usdc)
if options_trading_usdt is not None:
total += float(options_trading_usdt)
return round(total, 2)
except (TypeError, ValueError):
return None