Hide disabled exchanges from dashboard and fund overview.
Only aggregate and display exchanges with enabled monitoring in system settings. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -79,8 +79,15 @@ def build_dashboard_payload(
|
||||
ctx = build_daily_context(exchanges, trading_day=trading_day)
|
||||
day = ctx["trading_day"]
|
||||
accounts_raw = ctx.get("accounts") or []
|
||||
accounts = [_enrich_account_row(ac) for ac in accounts_raw]
|
||||
closed_trades = collect_closed_trades_snapshot(accounts_raw, today=day)
|
||||
accounts = [
|
||||
_enrich_account_row(ac)
|
||||
for ac in accounts_raw
|
||||
if ac.get("status") != "未监控"
|
||||
]
|
||||
closed_trades = collect_closed_trades_snapshot(
|
||||
[ac for ac in accounts_raw if ac.get("status") != "未监控"],
|
||||
today=day,
|
||||
)
|
||||
loss_alert_count = sum(1 for ac in accounts if ac.get("loss_alert"))
|
||||
now = datetime.now(timezone.utc).astimezone().strftime("%Y-%m-%d %H:%M:%S")
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user