Files
trading_bot_v4/app/api
mindesbunister 8d53c4bbad critical: Fix withdrawal statistics to use actual Drift deposits
- Query Drift Protocol's cumulativeDeposits for ground truth
- Discovered user deposited ,440.61 (not hardcoded 46)
- Previous withdrawals: ~26.78 (not tracked in ENV)
- Database P&L -.01 is correct
- Reconciliation: ,440.61 deposits - .01 P&L - 26.78 withdrawn = 11.82 current
- Available profit now shows current balance (includes all trading results)
- Created /api/drift/account-summary endpoint for account reconciliation
- Statistics now mathematically consistent and trustworthy
2025-11-19 19:25:59 +01:00
..