diff --git a/app/api/trading/execute/route.ts b/app/api/trading/execute/route.ts index 061d080..59fa056 100644 --- a/app/api/trading/execute/route.ts +++ b/app/api/trading/execute/route.ts @@ -553,6 +553,9 @@ export async function POST(request: NextRequest): Promise= 0 ? '+' : ''}${improvementDirection.toFixed(2)}% +💵 Value saved: $${(Math.abs(improvementDirection) / 100 * positionSizeUSD).toFixed(2)} + +${reason === 'timeout' ? '⏰ Executed at timeout (max wait reached)' : '✅ Optimal entry confirmed'} + `.trim() + + await sendTelegramMessage(message) + logger.log(`📱 Smart Entry: Telegram notification sent`) + } catch (telegramError) { + console.error(`❌ Smart Entry: Telegram notification failed:`, telegramError) + // Don't fail the trade execution just because notification failed + } } catch (pmError) { console.error(`❌ Smart Entry: Failed to add to Position Manager:`, pmError) }