fix: add total_pnl to stats API top-level response
This commit is contained in:
parent
bda42e669a
commit
77d38c7269
@ -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),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user