generate_lineups
Generate Lineups
Responses:
200: Successful Response (Success Response) Content-Type: application/json
Example Response:
{
"status": "Status",
"generated_at": "Generated At",
"warnings": [],
"exposures": {},
"lineups": []
}422: Validation Error Content-Type: application/json
Example Response:
{
"detail": [
{
"loc": [],
"msg": "Message",
"type": "Error Type",
"ctx": {}
}
]
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Slate date YYYY-MM-DD | |
| runs | No | Accepted for tier limits and response metadata. Portfolio quality is controlled by preset, candidate_pool_size, pool_oversample_multiplier, and simulation settings. | |
| seed | No | Random seed for reproducibility | |
| locks | No | Players to lock in | |
| sport | No | Sport engine to run: nba or mlb. | nba |
| style | No | ||
| avoids | No | Players to avoid | |
| n_sims | No | Monte Carlo iterations when simulation is enabled. | |
| preset | No | Strategy preset key. | gpp_pro_pattern |
| lineups | No | Number of lineups (overrides preset default) | |
| platform | No | V12 platform profile: fd or dk. | fd |
| sim_mode | No | Simulation mode. NBA: mvn/off. MLB: on/off. | |
| slate_id | No | Specific slate ID from /v1/slates. Overrides date-based lookup. | |
| strategy | No | GPP or cash game strategy | |
| plan_only | No | When true, the server resolves preset / contest / authoritative slate / top-run-env / locks but does NOT run the optimizer. Returns a Plan response so the user can review and confirm before spending credits on a real generate. Costs 0 credits; normal slate-open safety checks still apply. | |
| contest_id | No | Optional contest handle for building an entry-update CSV from the user's existing contest entries. | |
| fd_user_id | No | DEPRECATED on /v1/generate: fd_user_id is bound server-side to your API key (see /v1/admin/bind-fd-user). Body value is IGNORED on the public route unless X-Internal-Secret matches. Kept on the schema for the internal admin path only. | |
| focus_games | No | Game keys to emphasize, e.g. ['PHI@BOS']. Applies a small documented projection nudge. | |
| allow_locked | No | Explicit replay/late-swap override. Default false blocks slate_id generation once any game has started. | |
| refresh_data | No | Force a fresh V12 data refresh for user-facing generation. Backtests should set false. | |
| exposure_caps | No | Per-player exposure caps {name: 0.0-1.0} | |
| contest_fallback | No | Escape hatch when a contest_id cannot be mapped to a slate (contest_slate_unresolved). 'slate_only' + an explicit slate_id builds on THAT slate and skips contest-specific behavior (field-size routing, entry-template mapping) instead of failing the whole generate. Requires slate_id; without it the request still fails closed. Omit for normal contest-anchored builds. | |
| contest_field_size | No | Total entries (field size) of the selected contest. Governs the MLB objective: field <= 10 -> max-mean (mlb_small_field_se); field > 10 -> ceiling (mlb_se_ceiling) with a continuous ceiling tilt and the real field size fed into contest simulation. A matched contest_id lobby row is authoritative; this value is the fallback when that row is unavailable. | |
| entry_template_csv | No | Raw CSV of a FanDuel entries-upload-template the operator already downloaded. When present, the entry-upload is filled from its OWN entry_ids locally — no FanDuel API / session / PerimeterX call. Fixes fd_entry_template_auth_expired when the user already has the template in hand. | |
| team_exposure_caps | No | Per-team portfolio caps, as [["COL",0.5],...] pairs or {"COL":0.5} dict. | |
| candidate_pool_size | No | Exact candidate pool size for Pool→Rank→Keep-N selection. 0/None uses preset multiplier. | |
| contest_max_entries | No | Max entries per user for the selected contest. Used to identify multi-entry mass GPPs (>=4) which keep the caller's preset. Field SIZE, not this, governs the MLB objective — see contest_field_size. | |
| max_hitter_exposure | No | Portfolio cap: max share of delivered lineups any ONE hitter may appear in (0.4 = 40%). Pitchers exempt. | |
| max_pitcher_exposure | No | Portfolio cap: max share of delivered lineups any ONE pitcher may appear in. | |
| projection_overrides | No | User-uploaded projection/ownership rows. Supports name/player_id/team/position/projection/ownership/ceiling/floor/stddev. | |
| auto_team_exposure_cap | No | Default per-team portfolio cap (share of lineups containing ANY given team). Per-team entries in team_exposure_caps win over it. | |
| pool_oversample_multiplier | No | Candidate pool multiplier when candidate_pool_size is not set. |