feat: add hub fund overview tab with 180-day equity curves
Add /funds page for total and per-account balance (funding+trading), drawdown, and daily snapshots from monitor board aggregation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -391,7 +391,14 @@ def build_daily_context(
|
||||
"total_funding_usdt": round(total_funding, 4) if total_funding is not None else None,
|
||||
"total_trading_usdt": round(total_trading, 4) if total_trading is not None else None,
|
||||
}
|
||||
record_fund_snapshot(day, accounts, keep_days=FUND_HISTORY_DAYS)
|
||||
snap_accounts = [
|
||||
{
|
||||
**ac,
|
||||
"monitored": ac.get("status") != "未监控",
|
||||
}
|
||||
for ac in accounts
|
||||
]
|
||||
record_fund_snapshot(day, snap_accounts, keep_days=FUND_HISTORY_DAYS)
|
||||
fund_history = get_fund_history(anchor_day=day, keep_days=FUND_HISTORY_DAYS)
|
||||
account_names = {str(ac.get("key") or ac.get("id")): ac.get("name") for ac in accounts}
|
||||
fund_history_text = format_fund_history_text(fund_history, account_names=account_names)
|
||||
|
||||
Reference in New Issue
Block a user