Add Random direction option — picks Buy or Sell once per batch

All accounts in the same batch trade the same resolved direction.
Each new batch (after positions are flat) picks a fresh random direction.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Senofy
2026-03-10 03:35:50 -05:00
co-authored by Claude Sonnet 4.6
parent 8848f90b11
commit a13096ea86
3 changed files with 23 additions and 13 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import { POINT_VALUES } from '@/lib/trading-logic';
export async function POST(req: NextRequest) {
try {
const body = await req.json() as { action: 'Buy' | 'Sell'; symbol: string };
const body = await req.json() as { action: 'Buy' | 'Sell' | 'Random'; symbol: string };
const { action, symbol } = body;
if (!action || !symbol) {