Commit Graph

3 Commits

Author SHA1 Message Date
mindesbunister
8c80c577cb fix: Improve automation stop functionality and add debug logging
Stop API improvements:
- Added comprehensive debug logging for stop process
- Changed session status from INACTIVE to STOPPED for clarity
- Better error tracking and result reporting

Automation service improvements:
- Added isRunning check at start of runAutomationCycle to prevent zombie cycles
- Enhanced stop method with better logging and state reset
- Proper config cleanup after database update to prevent residual processes
- More robust interval clearing and state management

These changes should fix the issue where automation appears stopped
but continues running in background.
2025-07-24 17:42:50 +02:00
mindesbunister
55cea00e5e Fix automated trading display calculations
Fixed position size calculation: 00 investment now shows 00 position (was 04.76)
 Fixed token amount display: Now shows correct tokens (~0.996) for 00 investment (was 2.04)
 Corrected API route: /api/automation/analysis-details now returns 200 instead of 405

Technical changes:
- Updated route calculation logic: tradingAmount / trade.price for correct token amounts
- Fixed displayPositionSize to show intended investment amount
- Used Docker Compose v2 for container management
- Resolved Next.js module export issues

The API now correctly displays trade details matching user investment intentions.
2025-07-20 22:32:16 +02:00
mindesbunister
892c2c845f feat: implement complete automation system with real trading connection 2025-07-18 20:02:45 +02:00