Files
trading_bot_v3/app/api/screenshot/route.ts
root 3361359119 feat: Add persistent settings and multiple layouts support
- Add settings manager to persist symbol, timeframe, and layouts
- Support multiple layouts for comprehensive chart analysis
- Remove debug screenshots for cleaner logs
- Update AI analysis with professional trading prompt
- Add multi-screenshot analysis for better trading insights
- Update analyze API to use saved settings and multiple layouts
2025-07-09 14:24:48 +02:00

16 lines
561 B
TypeScript

import { NextRequest, NextResponse } from 'next/server'
import { tradingViewCapture } from '../../../lib/tradingview'
export async function POST(req: NextRequest) {
try {
const { symbol, filename } = await req.json()
if (!symbol || !filename) {
return NextResponse.json({ error: 'Missing symbol or filename' }, { status: 400 })
}
const filePath = await tradingViewCapture.capture(symbol, filename)
return NextResponse.json({ filePath })
} catch (e: any) {
return NextResponse.json({ error: e.message }, { status: 500 })
}
}