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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user