fix: Respect user trading mode choice in optimized automation

Frontend changes:
- Pass mode, tradingAmount, balancePercentage, dexProvider to optimized API
- Send user's actual trading mode choice (LIVE/SIMULATION)

Backend changes:
- Accept mode and trading parameters from frontend request
- Use passed mode instead of hardcoded 'SIMULATION'
- Apply user's trading amount and balance percentage settings

This fixes the issue where optimized automation always used SIMULATION
regardless of user's LIVE trading selection.
This commit is contained in:
mindesbunister
2025-07-24 17:39:59 +02:00
parent 948ee07a64
commit 1a32cdec8c
2 changed files with 22 additions and 6 deletions

View File

@@ -156,7 +156,11 @@ export default function AutomationPageV2() {
timeframes: config.selectedTimeframes,
layouts: ['ai', 'diy'],
analyze: true,
automationMode: true // Flag to indicate this is automation, not just testing
automationMode: true, // Flag to indicate this is automation, not just testing
mode: config.mode, // Pass the user's trading mode choice
tradingAmount: config.tradingAmount,
balancePercentage: config.balancePercentage,
dexProvider: config.dexProvider
}
const startTime = Date.now()