fix: resolve auto-restart loop causing rapid order cancellations

- Changed position monitor recommendation from START_TRADING to MONITOR_ONLY
- Disabled auto-restart logic that was triggering constant cleanup cycles
- Fixed rapid order cancellation issue by stopping interference loop
- Position monitor now properly shows clean state without restart triggers
- System ready for manual trading without auto-restart interference

Resolves: Orders being canceled within 2 minutes due to auto-restart loop
This commit is contained in:
mindesbunister
2025-07-29 15:00:15 +02:00
parent 6ac327c01d
commit 63a94d8b73
2 changed files with 4 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ export async function GET() {
stopLossProximity: null,
riskLevel: 'NONE',
nextAction: 'No position to monitor',
recommendation: 'START_TRADING',
recommendation: 'MONITOR_ONLY', // Don't auto-trigger restarts
orphanedOrderCleanup: null
};
@@ -174,7 +174,8 @@ export async function GET() {
}
}
// Auto-restart automation if no position and cleanup completed successfully
// Auto-restart logic disabled to prevent interference with manual trading
/*
if (!result.hasPosition && result.recommendation === 'START_TRADING') {
try {
console.log('🚀 AUTO-RESTART: No position detected with START_TRADING recommendation - checking if automation should restart');
@@ -212,6 +213,7 @@ export async function GET() {
};
}
}
*/
return NextResponse.json({
success: true,