feat: options UI scroll layout, stats card, funding balance, and cross-account transfer

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-07 09:57:13 +08:00
parent 090b9c6215
commit e82fd15bb7
12 changed files with 245 additions and 66 deletions
@@ -89,11 +89,14 @@ def total_funds_usdt(
funding_usdt: float | None,
trading_usdt: float | None,
options_trading_usdc: float | None = None,
options_funding_usdc: float | None = None,
) -> float | None:
if funding_usdt is None:
return None
try:
total = float(funding_usdt) + float(trading_usdt or 0)
if options_funding_usdc is not None:
total += float(options_funding_usdc)
if options_trading_usdc is not None:
total += float(options_trading_usdc)
return round(total, 2)