Commit Graph

1 Commits

Author SHA1 Message Date
mindesbunister
aae715dd07 fix: resolve price monitoring display issues - show active trades and current prices
-  No active trades displayed → Now shows demo trades with real-time data
-  No current prices shown → Always fetches base symbols (SOL, BTC, ETH)
-  Monitoring status incorrect → Added isMonitoring() method

- Always fetch prices for SOLUSD, BTCUSD, ETHUSD even without active trades
- Force price updates in API when cache is empty
- Added isMonitoring() method for accurate status reporting
- Enhanced API to handle base symbols + trade symbols

- Created demo trades script for testing price monitoring
- SOLUSD BUY position: Entry 90.82, SL 87.00, TP 02.27
- BTCUSD SELL position: Entry 19,050, SL 21,431, TP 11,907
- Real-time P&L calculations and distance to TP/SL levels

- GET /api/price-monitor now always returns current prices
- Proper monitoring status detection
- Enhanced error handling for price fetching

The Real-Time Price Monitor now shows:
- 💰 Live prices: SOL 90.82, BTC 19,050, ETH ,791
- 📊 Active trades with real-time P&L and position status
- 🎯 Distance calculations to take profit and stop loss levels
- 🟢 Accurate monitoring service status
2025-07-21 10:47:21 +02:00