DFS lineups API
dfs.lineupsbetaPOST/api/v1/dfs/slates/{slate_id}/optimizer/lineupsGenerate simulated or projection-optimal DFS lineups for a slate.beta
Build 1-500 contest-ready DFS lineups using game simulations and real contest payout curves (default) or fast projection optimization. Every body field is optional — send {} for 20 optimal GPP lineups.
slate_idbigintrequiredThe slate ID (dfs.slates.id).Basics
Lineup count, scoring mode, contest target, and output format.
countmodesimevoptimizercontest_typegpp_largeflagship20maxgpp_smallsingle_entryhigh_dollarcashcontest_idformatjsoncsvPlayers & Stacks
Per-player locks, fades, custom projections/ownership, stacks, and group rules.
playersstacksgroupsliked_onlyexclude_teamsexclude_gamesallow_offense_vs_dstPortfolio & Rules
Portfolio style, diversity, exposure caps, uniqueness, salary bounds, and sorting.
stylebalancedconcentratedcontrariandiversitymax_exposuremin_uniquesmin_salarymax_salarymax_players_per_teamflex_positionssort_byroievwin_ratetop_1_pcttop_01_pctcash_rateprojected_pointsp90sharpecurl -sS --compressed -X POST \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Prefer: wait' \
'https://api.stat-api.com/api/v1/dfs/slates/1045169/optimizer/lineups' \
-d '{
"count": 20,
"contest_type": "gpp_large"
}'Looking for stacks, player locks, custom projections, game scenarios, or late swap? Open the DFS Lineup Generation Cookbook →
200Generate simulated or projection-optimal DFS lineups for a slate.application/jsonshow example ▸
application/jsonResponse Schema(19 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
mode | string | — | Execution mode that produced this response (`"sim"`, `"ev"`, or `"optimizer"`). |
strategy_summary | objectnullable | — | Active strategy explanation, model receipt, and locked-holdout evidence when built with a strategy. Omitted when `strategy: "none"`. |
applied_settings | objectnullable | — | Transparent receipt of exact effective settings applied (`mode`, `strategy`, `lineup_count`, salary/exposure/uniqueness/risk/ownership knobs, `stack_rule_count`) and `caller_overrides[]` listing every Tier-2 field that overrode strategy defaults. |
slate | object | — | The slate. |
contest | objectnullable | — | The contest that priced the lineups (omitted in `mode: "fast"`). |
contest_targets | objectnullable | — | Projected Contest Score Targets (`cash_line`, `winning_score`, `top_10_pct_score`, `top_5_pct_score`, `top_1_pct_score`, `top_01_pct_score`, `points_gap_win_to_cash`) matching `/score-targets` verbatim. |
source | object | — | The source of the candidates' projections: `SIM` by default in `sim` mode, `STAT_API_LATEST` in `fast` mode, or `caller` for custom `players[].projected_points`. |
sim | objectnullable | — | Simulation metadata, draw partitions, cache status, and reusable `pool_id` (omitted in `mode: "fast"`). |
rules | object | — | Canonical echo of all effective request inputs with defaults filled in. |
warnings | listnullable | — | Non-fatal notes (`W_LOCK_OVERRIDES_GLOBAL_CAP`, `W_PLAYER_MIN_OVERRIDES_GLOBAL_CAP`, `W_STRATEGY_YIELDED_SALARY`, `W_STRATEGY_YIELDED_UNIQUES`, `W_POLICY_CONSTRAINT_RELAXED`, `W_SIM_UNAVAILABLE_FAST_FALLBACK`, `W_COUNT_ABOVE_ENTRY_CAP`, `W_SCENARIO_WEIGHTS_LOW_ESS`, etc.). Absent when empty. |
games | listnullable | — | Simulated games on the slate with live weighted NFL & NBA skill `correlations` and built-in/custom `scenarios[]` (omitted in `mode: "fast"` and `compact: true`). |
player_pool | list | — | Every eligible pool row on the slate (trimmed to referenced players when `compact: true`). Lineups reference rows by `slate_player_id`. |
portfolio | object | — | Portfolio-level summary: EV, ROI, finish rates, exposures, min-exposure shortfalls, and mathematical diversity metrics. |
lineups | list | — | Ranked lineups in portfolio selection order. |
opponent_field | objectnullable | — | Simulated contest opponent field composition, top stacks, and sample lineups (omitted in `mode: "fast"`). |
diagnostics | object | — | Pool sizes, exclusion breakdown, timings (milliseconds), and candidate funnel summary. |
frontier | list<object>nullable | — | Present on `pool_id` re-selection (`PortfolioSelectResponse`) when `include_diversity_frontier: true`; 4-point EV vs Portfolio Diversity Pareto frontier. |
patched_upload_csv | stringnullable | — | Present in late-swap mode for paid responses when `entries_csv` was uploaded; 1:1 patched Contest Entries CSV preserving Entry ID, Contest Name, Contest ID, and Fee. |
_metadata | objectnullable | — | Preview envelope (`is_preview`, `preview_limit: 5`, `total_available`, `required_tier`, `required_plan`) for callers without a paid DFS/Pro plan. Absent on paid responses. |
POST/api/v1/dfs/contests/{contest_id}/optimizer/lineupsGenerate DFS lineups calibrated to a specific contest's payouts and field size.beta
Build 1-500 lineups priced against this contest's exact payout ladder, field size, and entry cap. Every body field is optional — send {} for optimal lineups tailored to this contest.
contest_idbigintrequiredThe contest ID (dfs.contests.id).Basics
Lineup count, scoring mode, contest target, and output format.
countmodesimevoptimizercontest_idformatjsoncsvPlayers & Stacks
Per-player locks, fades, custom projections/ownership, stacks, and group rules.
playersstacksgroupsliked_onlyexclude_teamsexclude_gamesallow_offense_vs_dstPortfolio & Rules
Portfolio style, diversity, exposure caps, uniqueness, salary bounds, and sorting.
stylebalancedconcentratedcontrariandiversitymax_exposuremin_uniquesmin_salarymax_salarymax_players_per_teamflex_positionssort_byroievwin_ratetop_1_pcttop_01_pctcash_rateprojected_pointsp90sharpecurl -sS --compressed -X POST \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Prefer: wait' \
'https://api.stat-api.com/api/v1/dfs/contests/81183052/optimizer/lineups' \
-d '{
"count": 20
}'Looking for stacks, player locks, custom projections, game scenarios, or late swap? Open the DFS Lineup Generation Cookbook →
200Generate DFS lineups calibrated to a specific contest's payouts and field size.application/jsonshow example ▸
application/jsonResponse Schema(19 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
mode | string | — | Execution mode that produced this response (`"sim"`, `"ev"`, or `"optimizer"`). |
strategy_summary | objectnullable | — | Active strategy explanation, model receipt, and locked-holdout evidence when built with a strategy. Omitted when `strategy: "none"`. |
applied_settings | objectnullable | — | Transparent receipt of exact effective settings applied (`mode`, `strategy`, `lineup_count`, salary/exposure/uniqueness/risk/ownership knobs, `stack_rule_count`) and `caller_overrides[]` listing every Tier-2 field that overrode strategy defaults. |
slate | object | — | The slate. |
contest | objectnullable | — | The contest that priced the lineups (omitted in `mode: "fast"`). |
contest_targets | objectnullable | — | Projected Contest Score Targets (`cash_line`, `winning_score`, `top_10_pct_score`, `top_5_pct_score`, `top_1_pct_score`, `top_01_pct_score`, `points_gap_win_to_cash`) matching `/score-targets` verbatim. |
source | object | — | The source of the candidates' projections: `SIM` by default in `sim` mode, `STAT_API_LATEST` in `fast` mode, or `caller` for custom `players[].projected_points`. |
sim | objectnullable | — | Simulation metadata, draw partitions, cache status, and reusable `pool_id` (omitted in `mode: "fast"`). |
rules | object | — | Canonical echo of all effective request inputs with defaults filled in. |
warnings | listnullable | — | Non-fatal notes (`W_LOCK_OVERRIDES_GLOBAL_CAP`, `W_PLAYER_MIN_OVERRIDES_GLOBAL_CAP`, `W_STRATEGY_YIELDED_SALARY`, `W_STRATEGY_YIELDED_UNIQUES`, `W_POLICY_CONSTRAINT_RELAXED`, `W_SIM_UNAVAILABLE_FAST_FALLBACK`, `W_COUNT_ABOVE_ENTRY_CAP`, `W_SCENARIO_WEIGHTS_LOW_ESS`, etc.). Absent when empty. |
games | listnullable | — | Simulated games on the slate with live weighted NFL & NBA skill `correlations` and built-in/custom `scenarios[]` (omitted in `mode: "fast"` and `compact: true`). |
player_pool | list | — | Every eligible pool row on the slate (trimmed to referenced players when `compact: true`). Lineups reference rows by `slate_player_id`. |
portfolio | object | — | Portfolio-level summary: EV, ROI, finish rates, exposures, min-exposure shortfalls, and mathematical diversity metrics. |
lineups | list | — | Ranked lineups in portfolio selection order. |
opponent_field | objectnullable | — | Simulated contest opponent field composition, top stacks, and sample lineups (omitted in `mode: "fast"`). |
diagnostics | object | — | Pool sizes, exclusion breakdown, timings (milliseconds), and candidate funnel summary. |
frontier | list<object>nullable | — | Present on `pool_id` re-selection (`PortfolioSelectResponse`) when `include_diversity_frontier: true`; 4-point EV vs Portfolio Diversity Pareto frontier. |
patched_upload_csv | stringnullable | — | Present in late-swap mode for paid responses when `entries_csv` was uploaded; 1:1 patched Contest Entries CSV preserving Entry ID, Contest Name, Contest ID, and Fee. |
_metadata | objectnullable | — | Preview envelope (`is_preview`, `preview_limit: 5`, `total_available`, `required_tier`, `required_plan`) for callers without a paid DFS/Pro plan. Absent on paid responses. |
GET/api/v1/dfs/jobs/{job_id}Poll an async DFS optimizer or score-targets jobbeta
job_idpathstringrequiredcurl -sS --compressed \
-H 'Authorization: Bearer YOUR_API_KEY' \
'https://api.stat-api.com/api/v1/dfs/jobs/simjob_slate_1045169_1764000000_1'200Poll an async DFS optimizer or score-targets jobapplication/jsonshow example ▸
application/jsonResponse Schema(9 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
job_id | string | — | Unique async job identifier. |
kind | string | — | Job workload kind (`"sim_lineups"`, `"sim_portfolios_select"`, `"sim_late_swap"`, or `"score_targets"`). |
slate_id | bigintnullable | — | Slate ID associated with the job, when slate-scoped. |
contest_id | bigintnullable | — | Contest ID associated with the job, when contest-scoped. |
status | string | — | Current execution status while pending (`"queued"` or `"running"`). On completion, `200 OK` returns the final result payload directly instead of this envelope. |
queue_position | integer | — | 1-based queue position while `"queued"`, or `0` while `"running"`. |
retry_after_seconds | integer | — | Recommended polling delay in seconds (also sent in the HTTP `Retry-After` response header). |
poll_url | string | — | Relative polling path (`/api/v1/dfs/jobs/{job_id}`; also sent in the HTTP `Location` header). |
error | stringnullable | — | Error detail if attached on status responses; worker failures replay their exact HTTP error status and JSON body. |