Hub funds and dashboard: include OKX options balances in USDT totals.

Merge options USDC/USDT at 1:1 into fund overview snapshots, dashboard aggregation, and monitor board totals while keeping a separate options breakdown in the UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-07 13:06:01 +08:00
parent 6cc3382526
commit 3163912266
9 changed files with 362 additions and 21 deletions
+6
View File
@@ -55,6 +55,12 @@ def _enrich_account_row(ac: dict) -> dict:
"monitored": ac.get("status") != "未监控",
"funding_usdt": ac.get("funding_usdt"),
"trading_usdt": ac.get("trading_usdt"),
"perpetual_funding_usdt": ac.get("perpetual_funding_usdt"),
"perpetual_trading_usdt": ac.get("perpetual_trading_usdt"),
"options_funding_usdt": ac.get("options_funding_usdt"),
"options_trading_usdt": ac.get("options_trading_usdt"),
"options_float_pnl_u": ac.get("options_float_pnl_u"),
"options_open_position_count": ac.get("options_open_position_count"),
"capital_total_usdt": round(capital, 4) if capital is not None else None,
"available_trading_usdt": ac.get("available_trading_usdt"),
"pnl_u": st.get("total_pnl_u"),