// Quick test to verify the trade validation fix const testTradeValidation = async () => { console.log('๐Ÿงช Testing trade validation with fixed amountUSD...') const tradeData = { symbol: 'USDCUSD', side: 'BUY', amount: 5, amountUSD: 5, // This should be passed through correctly now useRealDEX: false, // Use simulation for testing tradingPair: 'USDCUSD/USDC' } console.log('๐Ÿš€ Sending test trade:', tradeData) try { const response = await fetch('http://localhost:3001/api/trading/execute-dex', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(tradeData) }) const result = await response.json() console.log('๐Ÿ“Š Response status:', response.status) console.log('๐Ÿ“Š Response body:', result) if (response.ok) { console.log('โœ… Trade validation fix is working!') } else { console.log('โŒ Trade validation still has issues:', result.message) } } catch (error) { console.error('โŒ Test failed:', error) } } testTradeValidation()