Remove broker session rest

Reverts 062ec07 and 5eb0ea7: every firm's broker session stays logged in
around the clock again, renewing its token on the fixed timer as before.
The tree is back to 6dd2528's. A session_rest row left in settings is
unused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-10-21 23:39:53 -05:00
co-authored by Claude Opus 5.5
parent 062ec07f0a
commit 5ec5abde6e
19 changed files with 43 additions and 901 deletions
+1 -6
View File
@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from 'next/server';
import { getCachedFirm } from '@/lib/firm-catalog';
import { firmInstruments, isFuturesFirm } from '@/lib/instruments';
import { getClients, isWaking, wakeFirm } from '@/lib/clients';
import { getClients } from '@/lib/clients';
export async function POST(
req: NextRequest,
@@ -27,11 +27,6 @@ export async function POST(
const clients = getClients();
const client = clients.get(firmId);
if (!client) return NextResponse.json({ error: 'Client not found for firm' }, { status: 404 });
// A resting session (lib/clients.ts) holds no login: start one, and
// let the caller come back once it's up.
if (wakeFirm(firmId, 'manual order') || isWaking(firmId)) {
return NextResponse.json({ error: "the firm's session is logging back in — try again in a minute" }, { status: 503 });
}
// A futures firm trades only what its instrument list (master Firms
// page) names.