From 77d38c726941c94935161db617fdb465c5f50f75 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 1 Mar 2026 01:42:39 +0000 Subject: [PATCH] fix: add total_pnl to stats API top-level response --- backend/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/main.py b/backend/main.py index 9737720..7baa144 100644 --- a/backend/main.py +++ b/backend/main.py @@ -778,6 +778,7 @@ async def paper_stats(user: dict = Depends(get_current_user)): "win_loss_ratio": round(win_loss_ratio, 2), "mdd": round(mdd, 2), "sharpe": round(sharpe, 2), + "total_pnl": round(sum(r["pnl_r"] for r in rows), 2), "long_win_rate": round(long_wr, 1), "long_count": len(longs), "short_win_rate": round(short_wr, 1),