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
@@ -31,6 +31,8 @@ export async function GET(
|
||||
minDayPnL: a.min_day_pnl,
|
||||
minTradingDays: a.min_trading_days,
|
||||
accountSize: a.account_size,
|
||||
maxLoss: a.max_loss,
|
||||
maxPositionSize: a.max_position_size,
|
||||
})),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user