Build DFS lineups
build_lineupsBuild up to 20 lineups for a Classic contest. Pass example (a sample slate) or players (the site's salary CSV text, or a list of player objects for DraftKings). Returns each lineup with its players, slots, salary and projected points, player exposure, notes about what defaults were applied, and upload_csv: a DraftKings/FanDuel/Yahoo upload-ready CSV string. Takes 2-60 s; if the result has status 'running', call get_lineup_result with the job_id. Lineups are optimal for the PROJECTIONS used, not predictions of results.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sport": "<sport>"
},
"name": "build_lineups"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Contest site (default dk). 'players' as a list works for dk only; fd and yahoo need the site's raw CSV text. | |
| rules | No | Sport-specific rules, using the web app's option names. Each is tagged with the sports it applies to; a rule for another sport is an error. get_lineup_example(sport) lists the ones for that sport. | |
| sport | Yes | ||
| example | No | Use a bundled sample slate instead of players (names from list_lineup_examples, or just the sport). Live lookups are skipped. | |
| players | No | EITHER the raw salary CSV text exactly as exported from the contest site (DraftKings 'Download players' / FanDuel players list / Yahoo export; a Classic contest), OR a list of player objects (site dk only). | |
| n_lineups | No | Lineups to build (default 10, max 20: diversity cuts make each extra lineup slower and the free server is small). | |
| min_salary | No | Lineups must spend at least this much. | |
| projections | No | Your own projections as {player name or id: points}; overrides the file's AvgPointsPerGame for those players. Names are matched case-insensitively. | |
| live_lookups | No | NHL line combos / starting goalies and MLB batting orders / probable pitchers from the public sites the web page uses (default false: skipped; sample slates always skip). Can fail or be slow; a failure is reported, the solve still runs. | |
| lock_players | No | Players (name or id) that must be in every lineup. | |
| wait_seconds | No | How long to wait inside this call (default 25). | |
| exclude_players | No | Players (name or id) to leave out. | |
| max_exposure_pct | No | Any one player may appear in at most this % of the lineups (100 = no cap). | |
| exclude_out_players | No | Drop players the file marks OUT/IL (default true, as the web page does). |