Add max_position_size to account configs
- DB migration: ALTER TABLE account_configs ADD COLUMN max_position_size INTEGER NOT NULL DEFAULT 0 - Added max_position_size to AccountConfigRow, createAccountConfig, updateAccountConfig in lib/db.ts - Added maxPositionSize to AccountConfig type in types.ts (0 = no limit) - GET /api/firms/[id] now returns maxPositionSize per account - POST /api/firms/[id]/accounts and PUT /api/account-configs/[id] accept maxPositionSize - Firm settings page: new Max Contracts column (blank = no limit) - auto-trade: contracts capped at maxPositionSize when > 0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
b2a1bdd1c3
commit
49580c6bb4
@@ -5,7 +5,8 @@ export interface AccountConfig {
|
||||
minDayPnL: number;
|
||||
minTradingDays: number;
|
||||
accountSize: number;
|
||||
maxLoss: number; // 0 = no limit; positive = account is "Dead" when loss exceeds this
|
||||
maxLoss: number; // 0 = no limit; positive = account is "Dead" when loss exceeds this
|
||||
maxPositionSize: number; // 0 = no limit; positive = max contracts per trade
|
||||
}
|
||||
|
||||
export interface FirmConfig {
|
||||
|
||||
Reference in New Issue
Block a user