Feat: Add paper trading reset endpoint

This commit is contained in:
2026-03-15 17:36:01 -07:00
parent 0bcb9666b0
commit eb36190254

12
app/api/reset/route.js Normal file
View File

@@ -0,0 +1,12 @@
import { NextResponse } from 'next/server';
import fs from 'fs';
export async function POST() {
try {
// Write a flag file that the worker polls for
fs.writeFileSync('/tmp/kalbot-reset-flag', 'reset');
return NextResponse.json({ success: true, message: 'Reset signal sent. Data will clear momentarily.' });
} catch (e) {
return NextResponse.json({ error: e.message }, { status: 500 });
}
}