fix(stats): fixed the PNL calculation (#963)

This commit is contained in:
Diego
2025-11-13 01:27:13 -05:00
committed by tangmengqiu
parent d9c6f8c9bf
commit a574717f7b
11 changed files with 549 additions and 304 deletions
+1
View File
@@ -36,6 +36,7 @@ type AccountSnapshot struct {
TotalUnrealizedProfit float64 `json:"total_unrealized_profit"`
PositionCount int `json:"position_count"`
MarginUsedPct float64 `json:"margin_used_pct"`
InitialBalance float64 `json:"initial_balance"` // 记录当时的初始余额基准
}
// PositionSnapshot 持仓快照