- Fixed Drift orders API to handle new object-based status format
- Updated cleanup API to properly detect orphaned TAKE PROFIT orders
- Changed status filtering from order.status === 0 to order.status.hasOwnProperty('open')
- Restored automation-v2 page with emergency stop functionality
- Added position monitor integration with real-time cleanup status
- Enhanced UI with emoji indicators and better status display
- Added emergency stop API endpoint for immediate trading halt
- Enhanced orphaned order detection for lingering SL/TP orders
- Added comprehensive debug logging for order processing
- Improved error handling and status reporting
- Real-time cleanup reporting in position monitor
Verified working:
- Orders API correctly detects active orders with new Drift format
- Cleanup system successfully processes orphaned orders
- Position monitor shows accurate cleanup status
- Emergency stop functionality integrated
25 KiB
25 KiB