Files
romysaputrasihananda 9716fc0955 feat(web): add Next.js portfolio with live MT5 dashboard
- Linear design system (dark canvas, lavender accent)
- Live account stats, open positions, pending orders (30s polling)
- Trade history with equity curve chart
- Backtest results table
- Proxy API routes — MT5_BASE_URL server-side only, never exposed to browser
- Deploy on Vercel: set MT5_BASE_URL env var

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 14:51:55 +07:00

16 lines
461 B
TypeScript

import { NextResponse } from "next/server";
import { getOrders } from "@/lib/mt5";
import { NextRequest } from "next/server";
export const dynamic = "force-dynamic";
export async function GET(req: NextRequest) {
const symbol = req.nextUrl.searchParams.get("symbol") ?? undefined;
try {
const data = await getOrders(symbol);
return NextResponse.json(data);
} catch (e) {
return NextResponse.json({ error: String(e) }, { status: 502 });
}
}