Aggregate the top status cards across strategies

With several strategies the header cards showed only the first one. Expose
day_pnl and drawdown_pct per strategy and add aggregateStatus() (frontend) so the
cards show the whole account: summed cash/equity/P&L/trades/positions, worst
drawdown, and any halt. Single-strategy runs are unchanged. Adds tests.
This commit is contained in:
matitos committed 2026-09-22 23:11:18 +00:00
1 parent 657c473e82
commit 57dcfe7adb
6 files changed
+133 -3

No files matched your search

+2
View File
@@ -134,6 +134,8 @@ def test_start_many_and_multi_status(runtime: Runtime, market: FakeMarketData) -
assert status["running"] is True
assert len(status["strategies"]) == 2
assert status["equity"] == 10000
# Per-strategy fields the dashboard aggregates must be present.
assert {"day_pnl", "drawdown_pct"} <= set(status["strategies"][0])
client.post("/api/bot/stop")