Find the main slate for a day
Almost every DFS question starts with one slate id. The main slate is the featured pool for an operator on a day — the full Sunday card in NFL, the full night in NBA, MLB, and NHL. This recipe lists a day's slates and keeps the main one. Every other DFS recipe takes the id it prints.
- What it is
- Resolves the one slate id that every other DFS recipe needs — the operator's featured contest pool for a given day and sport.
- When to use it
- Reach for this first, every time. Salaries, scores, games, teams, and contests are all filtered by slate_id, and this is where that id comes from.
- What you get back
- One slate row: its id, its operator-given name, its calendar date, and the kickoff time of its first game.
1.List one operator's slates for one day
dfs.slates accepts operator_id and date only TOGETHER — that pair is the endpoint's one required filter set. Send either alone and the server returns 400 missing_required_filters, whose `accepted` array names every combination it will take. Add league too, because an operator runs every sport on the same day and an unfiltered response mixes them.
const days = (await api.dfs.slates.list({ operator_id: 1, date: "2025-11-30", league: "nfl" })).slatesThe complete program
Every step as one runnable file. It reads STAT_API_KEY from the environment, and is the same file that ships in the cookbook project for each SDK.
import { StatApi } from '@stat-api/client'
const api = new StatApi() // reads STAT_API_KEY from the environment
// List one operator's slates for one day
const days = (await api.dfs.slates.list({ operator_id: 1, date: "2025-11-30", league: "nfl" })).slates
// Keep the main slate
const mains = days.filter((row) => row.main === true)
// Read the slate id
console.log("Main slate")
console.log(["id", "name", "date", "start_time"].join('\t'))
for (const row of mains) {
console.log([String(row.id ?? ''), String(row.name ?? ''), String(row.date ?? ''), String(row.start_time ?? '')].join('\t'))
}