fix(accounting): store net PnL (payout - net_cost) in close_pnl, migrate Paxton record from gross to net
CI/CD / build-and-push (push) Successful in 7s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
chemavx
2026-06-11 19:39:34 +00:00
co-authored by Claude Fable 5
parent c5ffc37820
commit 060fc89953
3 changed files with 15 additions and 7 deletions
+1 -1
View File
@@ -313,7 +313,7 @@ async def get_summary():
# unrealized_pnl_est: open positions, edge_net × net_cost fee.
# Estimated — uses model signal, not live price. Source: open trades.
# realized_pnl: closed positions with known resolution.
# Exact — computed from (resolution entry_price) × shares.
# Exact — payout net_cost per trade (net of fee), matches logs/Telegram.
# total_pnl: sum of both.
"unrealized_pnl_est": latest.get("unrealized_pnl_est") or 0,
"realized_pnl": latest.get("realized_pnl") or 0,