- Fixed trading history not showing closed positions with positive P&L - Implemented multi-source trading history fetching (SDK, Data API, DLOB, local DB) - Added proper P&L calculation using unrealized PnL from Drift positions - Enhanced TradingHistory component with error handling and sync functionality - Added manual sync button and better status messages - Created /api/drift/sync-trades endpoint for manual trade synchronization - Fixed database integration to properly store and retrieve trades with P&L - Added comprehensive fallback mechanisms for data fetching - Improved error messages and user feedback - Added TRADING_HISTORY_IMPROVEMENTS.md documentation This addresses the issue where recently closed positions with positive P&L were not appearing in the trading history section.
79 KiB
79 KiB