{
  "openapi": "3.1.0",
  "info": {
    "title": "Lineval API",
    "version": "1.0.0",
    "description": "One API for every product: **live** odds (in play, props included), **pregame** odds (a game's\nmain lines before it starts), **props** (the rest of a game's markets before it starts), **futures**,\n**racing** (race cards, pari-mutuel pools and results), **scores** (the live scoreboard and the\nscoresheet of every game, without odds) and **grading** (our verdict on every selection of\n`live`, `pregame` and `props`, by our published rules). Every product has the same model, ids,\nprices, times and errors. Learn it once.\n\nEach product is sold on its own or together with others, and they join on the game's `evt_`:\n- **pregame** has the game's main lines: its result, its handicap and its totals, the game's and\n  each team's, for the whole game and for each period. These market types, and their alternate\n  lines: `moneyline`, `match_result`, `double_chance`, `draw_no_bet`, `spread`, `asian_handicap`,\n  `set_spread`, `total`, `total_sets` and `team_total`;\n- **props** has every other market of the game: player props, and the game's specials (first or\n  last to score, race to, corners, cards, both teams to score, correct score, margins, half-time/\n  full-time, combinations, exact totals, odd/even, team statistics\u2026);\n- a market is in one of them, never in both: its type says which;\n- a game before it starts is always in `pregame`, and in `props` while it has a market there;\n- **live** has every market of a game in play, props included.\n\n## Quick start\n\nYou need one thing from us: a key (`{API_KEY}`).\nEvery REST call is a `GET` with the key in a header:\n\n```sh\ncurl -H \"Authorization: Bearer {API_KEY}\" \"https://api.lineval.com/v1/live/events?limit=5\"\n```\n\nTwo complete examples take every step below. We test both against the API with every change:\n- [Python](/docs/examples/quickstart.py): Python 3.10 or later, and `pip install websockets`.\n- [JavaScript](/docs/examples/quickstart.mjs): Node.js 22 or later, no packages. Its stream part runs\n  in a browser as it is.\n\nSet `LINES` and `STREAM` at the top to products your key includes, and run either one:\n\n```sh\nBASE_URL=https://api.lineval.com API_KEY={API_KEY} python quickstart.py 60\nBASE_URL=https://api.lineval.com API_KEY={API_KEY} node quickstart.mjs 60\n```\n\nThey print what they get, and stop after the seconds you give (without them, they run until\nstopped).\n\n### 1. Ask for events\n\n1. `GET /v1/live/events?limit=5`: the events, without markets. Pass `nextCursor` back as\n   `cursor` for the next page.\n2. `GET /v1/live/events/{eventId}`: one event with all its markets.\n3. `GET /v1/events/{eventId}`: the game's family. It says where the game is offered now\n   (`products`, each with its `href`), where its scoresheet is (`scoresheet`) and where our\n   verdicts on each product of lines are (`grading`). Follow those links as they are.\n4. `GET /v1/scores?confidence=confirmed`: the latest confirmed scoresheets (to settle on them, read\n   \"Scoresheets\": a confirmation can be withdrawn), and `GET /v1/live/grading`: our latest verdicts on\n   `live`. Both take `updatedSince` to fetch only what changed.\n\nOn `429` wait the seconds in `Retry-After`, and on `503` retry shortly. Any other error is in\nyour request or your key: the body says which (see Errors).\n\n### 2. Open the stream\n\nOne WebSocket for the products you list. It sends a snapshot of each product, then only what\nchanges. In a browser, send the key as the subprotocol:\n\n```js\nconst ws = new WebSocket(url, [API_KEY]);\n```\n\nFrom a server, send it as a header:\n\n```python\nasync with websockets.connect(url, additional_headers={\"Authorization\": f\"Bearer {API_KEY}\"}) as ws:\n```\n\n### 3. Resume with `since`\n\nKeep, per product, where you are: the `since` of `snapshot.end`, then the `seq` of every\nmessage you apply after it. Reconnect with them and you get only what you missed:\n\n```python\nif kind == \"snapshot.begin\":\n    in_snapshot.add(product)\n    since.pop(product, None)\nelif kind == \"snapshot.end\":\n    in_snapshot.discard(product)\n    since[product] = msg[\"data\"][\"since\"]\n```\n\n```python\nelif msg[\"seq\"] is not None and product not in in_snapshot:\n    since[product] = msg[\"seq\"]\n```\n\nThe messages of a snapshot carry their own event's `seq`, not the snapshot's. If a connection\ndrops before a product's `snapshot.end`, reconnect without `since` for that product.\n\n### 4. Handle the close codes\n\nReconnect with `since` after every close except `4400` (fix the request), `4401` (check your key)\nand `4403` (your key lacks a product), with the back-off of \"When the stream closes\" below, where\nevery code is listed. Also reconnect when no message came for 45 s: a `heartbeat` comes every\n15 s, so the connection is dead.\n\n## Authentication\n\nSend your key as `Authorization: Bearer <key>` on every REST call and on the stream. Browsers\ncannot set headers on a WebSocket, so the stream also accepts the key as the WebSocket\nsubprotocol, as shown above. Keys are never accepted in the URL, because URLs end up in logs.\n\nEach key lists the products it includes. It also sets how many streams it may keep open at\nonce and how many REST requests it may make per minute. `grading` comes with a product of lines:\na key has it together with `live`, `pregame` or `props` (one or more), and gets the verdicts of\nthose only.\n\n## The model\n\n| Object | What it is |\n|---|---|\n| **Event** | A game, match, race or competition: `id`, `product`, `sport`, `league`, `participants`, `startAt`, `status`, `score`, `clock`, `details` (racing), `rotation`, `schedule` |\n| **Market** | Something to bet on in an event: `type` and `period` from the catalogs, `line`, `participant` (a team or player when the market is about one), `main` (false on alternate lines), `book` (the sportsbook whose line it is; `null` on ours), `status`, `selections`; racing adds `legs` and `raceEventIds` |\n| **Selection** | One outcome of a market: `name`, `side`, `line`, `participant`, `price`, `status`, `opening` (a book's first line and price); racing adds `leg` and `couplingGroup` |\n| **Result** | How an event ended: `eventId`, `status`, `settledAt`; racing adds `racing` (finishers and dividends) |\n| **Grading** | Our verdicts on the selections of one product of lines for one game (grading): `markets` with each selection's `outcome`, `held` with why, `basis`, `rules`, `complete`, `revision` |\n| **Scoresheet** | The facts of how a game ended (scores): `status`, `score`, `periods`, `regulation`, `stats`, `timeline`, `players`, `appearances`, `confidence`, `sources`, `revision` |\n\nEvery field is always present: `null` when unknown or not applicable. You never need to check\nwhether a key exists.\n\n### Ids\n\nIds are opaque and stable: `evt_\u2026`, `mkt_\u2026`, `sel_\u2026`, `par_\u2026`, `lg_\u2026`. Store them and join on\nthem. **The same game keeps its `evt_` id in pregame, props and live.** A market or selection id\ndoes not change while it exists, whatever happens to its price or name.\n\n### Prices\n\nEvery price carries decimal and american odds together: `{\"decimal\": 1.909, \"american\": -110}`.\n`price` is `null` when no price is available.\n\n### Status\n\n`status` on a market or selection is `open`, `suspended` or `closed`.\n\n- **suspended:** cannot be bet right now. The last price is kept so you can show it, greyed out.\n- **closed:** final. The market will not reopen.\n\nA suspended market is never dropped: you get it again with `open` when betting resumes.\n\n### Times\n\nTimes are ISO 8601 in UTC with milliseconds: `2026-11-14T20:00:00.000Z`.\n\n### Rotation numbers\n\n`rotation` is a game's rotation numbers, as sportsbooks print them on the board and on the\nticket: `{\"away\": 501, \"home\": 502, \"draw\": null, \"official\": true, \"added\": false}`. Games with a home\nand an away side have one, in live, pregame, props and the scores board; `null` elsewhere.\n\n- `draw` is the draw's number, in games with a three-way result.\n- `official: true`: the market's own numbers. `false`: provisional, or ours while the market has\n  none (ours run from 5 000 000 up, apart from the market's). They may change: a provisional\n  number gets its definitive one, and ours give way to the market's when it lists the game.\n- **Numbers are not ids.** They are reused across days, and a game keeps its `evt_` id when its\n  numbers change. Join on `evt_`; show the numbers.\n- A game's periods and props share its numbers: the market says the period.\n- `added: true`: a game the books added outside the main schedule. Its numbers are the books' own.\n\n### Sportsbooks\n\nA market with a `book` is that sportsbook's line: `{\"id\": \"bk_\u2026\", \"name\": \"\u2026\"}`, with the book's public\nname. Markets with `book: null` are our own lines. One game can carry the same type and period from many\nbooks, each its own market.\n\n- **A book's main market keeps its id while its line moves:** it is \"this book's spread for this game\",\n  and its `line` and prices change in place. Alternate lines (`main: false`) are markets of their own.\n- **`opening`**, on each selection of a book's market, is the first line and price the book posted for it:\n  `{\"line\", \"price\", \"at\"}`. The current ones are `line` and `price`.\n- **Closing line:** a book's pregame market is `closed` when the game starts. Its last `line` and `price` are\n  the closing ones, and its `updatedAt` is when it closed: the game's start.\n- **In play,** a book's lines are markets of their own in `live`, with their own ids: only what the book posted\n  since the game started.\n- **When the books' lines cannot be kept current** for more than a short while, each book's market is\n  `suspended`, with its last prices, until they are again: a book's line is not left open at a price nobody\n  updates. Only those markets: `feed.status` and our own lines (`book: null`) are not affected. A suspended book\n  market comes back `open` with a `market.upsert`, as any other.\n- **Games only the books list** are events of their own, with the books' rotation numbers (`official: true`).\n  When such a game later comes in our own lines too, it keeps its `evt_` and our markets join the books'. In\n  the rare case the two cannot be told apart for sure in time (the sides listed the other way round), the first\n  event is removed (`event.remove`) and the game goes on under another `evt_`; ids are never reused.\n- `GET /v1/catalog/books` lists the books whose lines the products of your key carry now, with `region`\n  (`us`: licensed in a US state; `offshore`: serving US bettors from abroad; `null` when not known for\n  certain). Book ids are ours and never change.\n\n### Schedule\n\n`schedule` is `{\"originalStartAt\", \"startAt\", \"timeConfirmed\"}` in live, pregame, props, futures and the scores\nboard:\n\n- `originalStartAt`: the first start time we published for the game. It never changes.\n- `startAt`: the current one, the same as the event's `startAt`.\n- `timeConfirmed`: `false` while the hour is still to be announced (the date is known); `null`\n  when we cannot tell.\n\nA start that moves (and a postponement, `status: postponed`) is data: every change comes as an\n`event.upsert`, and what it means for bets already taken is your rule to apply. A start that moves and the\nmarket's official numbers can take up to 10 minutes to show.\n\n### Lines\n\nLines are numbers.\n- On a handicap market, `line` is the **home** team's handicap, and each selection carries its\n  own: home `-1.5`, away `+1.5`.\n- On a total, `line` is the total.\n- One market holds one line. Alternate lines are separate markets with `main: false`.\n\n## Catalogs\n\n`GET /v1/catalog/sports`, `/periods`, `/market-types`, `/stat-keys`, `/leagues` and `/books` hold the\nvocabulary of `sport.id`, `period`, `type`, a scoresheet's stat `key`, `league.id` and a market's `book.id`. Cache them, and refresh\nthem daily. Ids are never renamed or reused;\nnew ones may appear at any time, and a client must ignore ids it does not know.\n\nLeagues have no fixed list: `/v1/catalog/leagues` lists those of what the products of your key hold, games on\nthe board and the results, scoresheets and verdicts still kept (up to 30 days). A league with none of that is\nnot listed until it has some again, with the same id: keep the names you have seen. An event, a scoresheet and\na grading carry their league's name too. A market type's\n`gradedPeriodsBySport` follows our grader and can also lose entries, and its `gradedLeaguesBySport` is\nmeasured daily (see Grading).\n\n### Market forms\n\nEach market type has a `form` that says how to read its selections:\n\n| Form | Selections |\n|---|---|\n| `1x2` | `home`, `away`, `draw` |\n| `12` | `home`, `away` |\n| `dc` | `home_or_draw`, `draw_or_away`, `home_or_away` |\n| `hcp` | `home`, `away`, each with its own `line` |\n| `ou` | `over`, `under` at the market's `line` |\n| `yn` | `yes`, `no` |\n| `oe` | `odd`, `even` |\n| `wnb` | the opponent of the market's `participant` (`home` or `away`) and `draw`; stakes are returned if the named team wins |\n| `team_first` | `home`, `away`, or another outcome by name (such as \"No Goal\"); `line` numbers the goal, point or game |\n| `named` | one selection per outcome, by its name (correct score, bands, margins) |\n| `contest` | one selection per competitor (futures) |\n| `player_ou` | one market per player and line: `over`, `under` |\n| `player_yn` | one market per player: `yes`, `no` |\n| `player_exact` | one market per player: one selection per exact figure |\n| `player_band` | one market per player: one selection per `range` |\n| `player_winner` | one selection per player (first scorer, top scorer\u2026) |\n| `runner` | racing: one selection per runner; a bet names one (win, place, show) |\n| `ordered` | racing: one selection per runner; a bet names `legs` runners in finishing order (exacta, trifecta\u2026) |\n| `unordered` | racing: one selection per runner; a bet names `legs` runners in any order (quinella) |\n| `multi_race` | racing: the runners of every race in `raceEventIds`, each with its `leg`; a bet names one runner per race (daily double, pick 3\u2026) |\n\n### Periods\n\n`match` is the whole event as the sport counts it. That means regular time in soccer; overtime\ncounts in basketball, American football and ice hockey (shoot-out included), and extra innings\ncount in baseball. `regulation` is regular time only. Racing markets have the period `race`.\n\nEvery period, with its exact meaning, is in `/v1/catalog/periods`.\n\n### One game, everything about it\n\nEverything about a game hangs off its `evt_` id:\n- full game, halves, quarters and periods are markets of the same event, told apart by `period`;\n- team markets and player props are markets of the same event; the team or player is the market's `participant`;\n- the game keeps the same `evt_` in `pregame`, in `props`, in `live` and in `scores`, and its\n  result or scoresheet uses it too. Before the game, its main lines are in `pregame` and the rest\n  in `props`.\n\n`GET /v1/events/{eventId}` tells you where a game is offered right now (for example in `pregame`\nand in `props`), how many markets each product has, and where its result (`result`), its\nscoresheet (`scoresheet`) and our verdicts (`grading`, one link per product of lines) are when\nthere are some. Once the game has left every board and only\nits result or scoresheet is kept, `event` is `null`.\n\nEvery market type belongs to a **group**, for building tabs: `game` (game lines and game props),\n`team` (markets about one team), `stats` (statistics other than the score: corners, cards, shots,\nyards\u2026), `player` (player props),\n`futures` and `racing`. The groups are in `/v1/catalog/market-groups` and each type's group in\n`/v1/catalog/market-types`. To fetch only part of a game, add `periods`, `marketTypes` or\n`groups` to the event call, for example `?groups=player` or `?periods=1h,q1`. The stream takes the\nsame filters. Their values come from the catalogs: an unknown one is a `400 bad_request` (a stream\ncloses with `4400`), never an empty list.\n\n## REST\n\n| Call | Returns |\n|---|---|\n| `GET /v1/{product}/events` | Events without markets, sorted by `startAt`. Filters: `sports`, `leagues` (comma-separated ids), `from`, `to` (on `startAt`), `updatedSince`. Paginated: pass `nextCursor` back as `cursor`. |\n| `GET /v1/events/{eventId}` | One game across products: where it is offered and where its result is |\n| `GET /v1/{product}/events/{eventId}` | The event with all its markets. Narrow with `periods`, `marketTypes`, `groups` (comma-separated) |\n| `GET /v1/{product}/results` | Results (racing), sorted by `settledAt`. Filters: `sports`, `leagues`, `updatedSince` (on `settledAt`). Paginated like events. |\n| `GET /v1/{product}/results/{eventId}` | The latest result of one event |\n| `GET /v1/scores` | Scoresheets, sorted by `updatedAt`. Filters: `sports`, `leagues`, `updatedSince` (on `updatedAt`), `confidence=confirmed`. Paginated like events. |\n| `GET /v1/scores/{eventId}` | The latest scoresheet of one game. With `confidence=confirmed`, `404` while the latest is not confirmed |\n| `GET /v1/{product}/grading` | Our verdicts on `live`, `pregame` or `props`, sorted by `updatedAt`. Filters: `sports`, `leagues`, `updatedSince`. Paginated like events. |\n| `GET /v1/{product}/grading/{eventId}` | Our latest verdicts on one game in `live`, `pregame` or `props` |\n| `GET /v1/catalog/{name}` | `sports`, `periods`, `market-types`, `market-groups`, `stat-keys`, `leagues` or `books` |\n| `GET /v1/health` | Whether the API is serving: `200` with `{\"status\": \"ok\"}`, or `503` with `{\"status\": \"starting\"}` while it starts. No key needed. With your key it also has `products`: each product of your key with `ready`, `status` (`ok` or `degraded`, as in `feed.status`) and `events` (how many it holds now) |\n\n- **Filters** are comma-separated lists. `sports` and `leagues` are their names; `sport` and `league` are kept\n  for compatibility, here and on the stream (given both, they add up).\n- **Times** in `from`, `to` and `updatedSince` are ISO 8601 with their zone: `2026-11-14T20:00:00Z`,\n  `2026-11-14T20:00:00.000Z`, `2026-11-14T15:00-05:00` or `2026-11-14T15:00:00-0500` (encode `+` as `%2B`).\n  A date alone, `2026-11-14`, is its midnight UTC. `from` and `to` both include the time they name: for\n  the whole of 14 November, `from=2026-11-14&to=2026-11-14T23:59:59.999Z`. Anything else, a time without its\n  zone included, is a `400 bad_request` that names the parameter.\n- **`ETag`:** every `200` of these calls carries one (weak, `W/\"\u2026\"`). Send it back as `If-None-Match` and you\n  get `304 Not Modified`, with no body, until something changes.\n- **gzip:** send `Accept-Encoding: gzip` and a response of 1 KB or more comes gzip-compressed (smaller ones are\n  sent as they are).\n\n## The stream\n\n`wss://\u2026/v1/stream?products=live,pregame` opens one socket for the products you list.\n\nOptional filters, each a comma-separated list: `sports`, `leagues` (`sport`, `league` kept for compatibility), `events`,\n`marketTypes`, `periods` and `groups`. For `scores`, `confidence=confirmed` too (see Scores). For `grading`,\n`gradingProducts` (`live`, `pregame`, `props`): by default the verdicts of every product of lines your key\nincludes.\n\nEvery message has the same envelope:\n\n```json\n{\"type\": \"market.upsert\", \"seq\": 1794620750734310, \"ts\": \"2026-11-14T20:00:00.123Z\",\n \"product\": \"live\", \"data\": { /* the market */ }}\n```\n\n| Type | `data` | What to do |\n|---|---|---|\n| `snapshot.begin` | `{}` | A full snapshot of the product follows. |\n| `snapshot` | an event with all its markets | Store it, replacing what you had. |\n| `snapshot.end` | `{\"since\": seq}` | The snapshot is complete. Deltas follow. |\n| `event.upsert` | an event, without markets | Add the event, or replace its fields. Its markets stay as they are. |\n| `event.remove` | `{\"eventId\"}` | Drop the event and all its markets. |\n| `market.upsert` | a whole market | Add the market, or replace it whole. Never merge fields. |\n| `market.remove` | `{\"eventId\", \"marketId\"}` | Drop the market. |\n| `result` | an event's whole result | Replace the result you had for that event. In a snapshot it follows its event. Racing only. |\n| `grading` | our whole verdicts on one product of lines of a game | Replace what you had for that game and product. Grading only. |\n| `scoresheet` | a game's whole scoresheet | Replace the scoresheet you had for that game. In a snapshot it follows its event while the event is on the board. Scores only. |\n| `scoresheet.withdrawn` | `{\"eventId\", \"revision\", \"confidence\", \"updatedAt\"}` | A confirmed scoresheet is no longer confirmed (now `provisional` or `disputed`): check anything settled on it. Sent also with `confidence=confirmed`, which never sends that revision itself. Scores only. |\n| `feed.status` | `{\"state\": \"ok\" \\| \"degraded\"}` | `degraded` means the data may be stale: treat every open market as suspended until `ok`. |\n| `heartbeat` | `{}` | Every 15 s when nothing else is sent. Its `seq` and `product` are `null`: it is not part of any product's sequence. |\n\n### Resuming\n\nA product's `seq` is a point in its sequence, the same on every server and across restarts. After a\nsnapshot, its `event.*`, `market.*`, `result`, `scoresheet` and `grading` messages each have a higher `seq`\nthan the one before. `snapshot.begin`, `snapshot.end` and `feed.status` are not changes: they carry the\n`seq` of the point they mark, which the message before may have too. Inside a snapshot, each event and its\nresult or scoresheet carry their own `seq`, never higher than the snapshot's `since`, in no order. A reconnect that cannot resume gets a\nfresh snapshot, whose `seq` may be lower than your `since`. So never drop a message because its `seq` is\nnot higher than the last one: `seq` says where to resume, not what is new. Keep, for each product, the\n`since` of its `snapshot.end` and then the `seq` of every message you apply after it (a\nsnapshot's messages carry their own event's `seq`: a snapshot cut off before its end is not a\nplace to resume from). When you reconnect, pass them all:\n\n```\n/v1/stream?products=live,pregame&since=live:1794620750734310,pregame:1794620750811002\n```\n\n- If the server still holds what you missed, you get exactly those messages.\n- If not, you get a fresh snapshot of that product. Replace your state with it.\n\n### When the stream closes\n\n**Reconnect with `since` after every close, except the three marked \"no\" below.** Servers restart\nfor deploys and there is more than one: a reconnect may land on another server, and `since` works\non any of them. Do not reconnect only on one code.\n\n| Code | Meaning | What to do | Reconnect on its own |\n|---|---|---|---|\n| `1000` | Closed normally, by you or by a proxy on the way | If you still want the stream, reconnect with `since` | yes |\n| `1001` | A server or a proxy on the way is shutting down | Reconnect with `since`, after a short random wait (up to 1 s) | yes |\n| `1006` | Never sent: your library reports it when the connection dropped with no close frame (network, proxy) | Reconnect with `since`, with back-off | yes |\n| `1011` | An error of ours while serving the stream | Reconnect with `since`, with back-off; tell us if it repeats | yes |\n| `1012` | The server is restarting (a deploy); another server takes your reconnect | Reconnect with `since` at once, after a random wait of up to 1 s | yes |\n| `1013` | Starting up, or re-synced with its sources: what you hold may not match | Reconnect with `since`, after a short back-off | yes |\n| `4400` | A query parameter is not valid; the reason names it | Do not retry the same URL: fix the request | no |\n| `4401` | No key, an unknown key, or a key revoked while connected | Do not retry: check your key with us | no |\n| `4403` | Your key does not include a product you asked for (or lost it) | Reconnect without that product, or ask us to add it | no |\n| `4429` | Either you were not keeping up (reason: `not keeping up with the stream`) or you are over your connection limit (reason: `over your connection limit`) | Not keeping up: reconnect with `since` and process faster. Connection limit: close another connection, or wait 30 s before retrying | yes |\n\nAny other code: reconnect with `since`, with back-off.\n\n**Back-off:** wait 1 s, then double up to 30 s, each wait with up to 1 s added at random (so many\nclients do not reconnect in the same instant); go back to 1 s once a connection has lasted a\nminute. A connection refused before it opens (HTTP 503) is a `1013`.\n\nThe same table is in the AsyncAPI document, under the stream channel's `x-close-codes`.\n\n### Keeping up\n\nProcess messages as they arrive, and do your heavy work off the socket's thread. A client that\nfalls too far behind is disconnected with `4429` (reason `not keeping up with the stream`).\nReconnect with `since` and you lose nothing.\n\n## Racing\n\nHorse, harness and greyhound racing (`horse_racing`, `harness_racing`, `greyhound_racing`).\nRacing is **pari-mutuel**: a winning bet is paid what its pool pays, known only when the\nrace is official. There are no fixed odds, so every selection's `price` is `null`.\n\n**Only what can be settled is offered.** A track's races are published only while its\nofficial results reach us: a track with no official result in the 7 days before a meeting is\nleft out (no events, no markets) until one arrives. Once a meeting is offered it stays offered:\na race is never withdrawn before it runs. Every race you can bet here has a result coming.\n\n### Races, runners and pools\n\n- **Event:** one per race. `league` is the track (with its `country`), `name` reads\n  \"Belmont Park R5\", `startAt` is the post time (it moves when a race is delayed) and\n  `details` is `{\"raceNumber\", \"distance\", \"surface\"}`.\n- **Participants:** the runners, with `role: \"runner\"` and `number` (saddle cloth or trap).\n  `details` is `{\"jockey\", \"trainer\", \"weightLb\", \"medication\", \"scratched\", \"morningLine\",\n  \"morningLineFraction\"}`. `jockey` is the driver in harness racing and `null` for greyhounds.\n- **The morning line is not a price.** It is the track's forecast of the odds, printed before\n  betting opens, and the only odds figure a race card has. Show it as a guide; never accept a\n  bet at it.\n- **A runner's `par_` id names it in one race.** Do not join races on it.\n- **Markets:** one per pool, by type: `win`, `place`, `show`, `exacta`, `quinella`,\n  `trifecta`, `superfecta`, `forecast`, `tricast`, `daily_double`, `pick_3` \u2026 `pick_7`.\n  Each selection is a runner, with its `number` in `participant`. `legs` says how many\n  runners a bet names.\n- **Multi-race pools** (daily double, pick N) live on the event of their first race.\n  `raceEventIds` lists the races in order, and the selections are the runners of all of them,\n  each with its `leg` (1 for the first race). A bet names one runner per leg.\n\n### Coupled entries and scratches\n\nThese follow the usual North American pari-mutuel rules.\n\n- **Coupled entries.** Runners of one race whose selections share a `couplingGroup` (1, 1A, 1X)\n  are one betting interest.\n  - A bet on any of them is a bet on the entry.\n  - A dividend that names any member pays every bet on the entry: a bet on `1` wins when `1A`\n    finishes first.\n  - If a member is scratched and another still runs, the entry runs and its bets stand.\n- **Scratches.** A scratched runner's selection is `closed` and its `participant` details say\n  `scratched: true`; the result lists it in `scratched`.\n  - **Win, place and show:** a bet on a scratched runner (a whole entry, if coupled) is refunded.\n  - **Exacta, quinella, trifecta, superfecta, forecast, tricast:** a combination that includes\n    a scratched runner is refunded.\n  - **Daily double and pick N:** a scratch in the first race refunds the bet. A scratch in a\n    later race is settled by the track's own rule for that pool. Most tracks give the bet the\n    post-time favourite; some pay a consolation. Set your rule in your terms.\n\n### When betting stops\n\n| Status | When |\n|---|---|\n| market `open` | Betting is open. |\n| market `suspended` | 90 s before post, or the track stopped taking bets on the pool. It reopens if the post moves later. |\n| market `closed` | Betting closed for good: the race is off. |\n| selection `closed` | The runner was scratched (withdrawn). It does not come back. |\n| event `live` | The race is off, or run and not yet official. |\n| event `finished` | The result is official (`racing.final: true`). |\n| event `cancelled` | The race was not run: every bet on its single-race pools is refunded. A multi-race pool that starts or runs through it is still settled by the dividends of its last race, where that leg counts as `anyRunner`. |\n\n### Results and dividends\n\nA race's result arrives as a `result` message (and at `GET /v1/racing/results/{eventId}`).\nIt can arrive several times; each one replaces the last.\n\n- **Settle only on `racing.final: true`.** A result with `final: false` is provisional: show\n  it, never settle on it.\n- **`racing.corrected: true`** means the numbers replace ones already published as final\n  (an inquiry, a disqualification), also when you only see the new final. Anything settled\n  on the old numbers must be checked.\n- A result carries its event's `sport` and `league` (the track), because it outlives the event.\n- **`racing.dividends`** pays every winning combination: win, place and show (one per\n  placed runner) and every pool that ends in this race. A multi-race pool ends in its last\n  race: a pick 4 over races 5\u20138 is paid in the result of race 8. Its `marketId` is the\n  market you took the bet on (`null` if no such market was published).\n- **Pay `stake / base \u00d7 paid`.** `base` is the stake the dividend is quoted for, and it\n  changes by pool and by country (2.00 for win, place and show in North America; 1.00, 0.50,\n  0.20 or 0.10 for exotics). Never assume it. `paid` includes the stake. `currency` is set\n  when the track states it.\n- **`legs`** is the winning combination: one per position (single-race pools) or per race\n  (multi-race pools), with the runners' `numbers` and `participantIds`. A leg with more than\n  one number (a dead heat, a coupled entry) is won by any of them; `anyRunner: true` means\n  every runner counts in that leg.\n- **A pool can pay several dividends:** dead heats, and consolations (`note: \"5 OF 6\"`).\n  On a greyhound dead heat for first, each dog's win dividend is its whole starting price\n  with `base` multiplied by the dogs tied, so the same formula pays the dead-heat rule.\n  `note: \"CARRYOVER\"` (with `paid: 0` and no legs) means nobody won: those bets lose.\n- **`racing.refunds`** lists the pools the track refunded: return every stake.\n- **`racing.held`** lists the markets the final result does not settle yet, each with its\n  `reason` and `until` (ISO 8601 in UTC). Settle or refund nothing on them: a later result\n  (`corrected: true`) pays them or lists them in `refunds`, by `until` at the latest. The one\n  reason today is `awaiting_official_dividend`: a pick 5 or pick 6 taken from the track's\n  published program, whose dividend or carryover can come up to 3 hours after the race's\n  result.\n- **No dividend, no payout:** a bet on a pool that is neither paid, refunded nor held in the\n  final result has no official dividend. Refund it.\n- **`racing.offAt`** is when the race actually started: void any bet accepted after it.\n- `finishers` holds positions 1 to 3 (4 where a place pays four); `scratched` lists the\n  runners withdrawn.\n\n### How long things stay\n\n- **A race leaves the board** (`event.remove`) 2 hours after its result became final, or\n  24 hours after its post if no final result comes.\n- **Its result stays 7 days** after it was published, at `GET /v1/racing/results` and\n  `GET /v1/racing/results/{eventId}`, also once the event is gone. A correction in that time\n  still arrives as a `result` message, for a race no longer on the board too: match it by\n  `eventId`.\n\n## Scores\n\nThe facts of every game, without odds and without our reading of them: what happened, for you\nto settle with your own rules or to show. A key with only `scores` gets no prices.\n\n### The live board\n\n`GET /v1/scores/events` and the stream (`products=scores`) carry the games in play as events\nwithout markets: `status`, `score` and `clock`, with the same `evt_` as in `live`, `pregame` and `props`.\nA game leaves the board when it ends; its scoresheet follows.\n\n### Scoresheets\n\n| Field | What it is |\n|---|---|\n| `eventId`, `sport`, `league`, `participants`, `startAt` | As in the event: the scoresheet outlives it |\n| `status` | `finished`; `retired`, `abandoned` or `incomplete` (stopped part way: completed periods stand); `postponed`, `cancelled`, `walkover` or `not_played` (not played) |\n| `score` | The final `{home, away}`: sets in tennis, volleyball and the other set sports. `null` when the game was not played, and when one source alone says it did not finish |\n| `periods` | `{period, home, away}`, with ids from `/v1/catalog/periods` (`1h`, `q1`, `p1`, `i1`, `set1`\u2026). Only the periods we are sure of: extra time and shootouts are in `regulation` |\n| `regulation` | `null` when the final is the score at the end of regulation time. Otherwise the score when regulation ended (`home`, `away`; `null` when not known for certain) and `wentTo`: `extra_time` (extra time, overtime or extra innings) or `shootout`, with the `shootout` score. `wentTo` is `null` when the records do not say: overtime or the shootout in ice hockey, or not even whether the game went past regulation (every field `null`). Then do not settle a regulation-time market on the final. Given for soccer, futsal, handball, rugby, basketball, American football, ice hockey and baseball |\n| `stats` | Per team: `{key, home, away}`, keys from `/v1/catalog/stat-keys` (`corners`, `yellowCards`, `shots`\u2026) |\n| `timeline` | Goals and cards, in order: `{type, minute, addedTime, team, player, participantId, ownGoal, penalty}`. A goal's `team` is the side it counted for |\n| `players` | The boxscore: `{name, participantId, team, stats}`. `participantId` is the player's `par_` id in player markets when the market spells the name as the boxscore does (some names differ between sources: check the name too) |\n| `appearances` | Who played, from the lineups: `{name, participantId, team, status, minute, addedTime, sources}`. `status`: `started`, `came_on` (a substitute who came on; `minute` and `addedTime` say when) or `unused` (on the bench, never came on), the one most sources give; `sources` is `{agreeing, disagreeing}` for that status. A player the sources split evenly on is left out, and so is one no lineup lists. Soccer, in games with player markets that need it (goals, goalscorers, cards); empty otherwise. A fact, not a rule: whether a player's prop is void is the grading's (it needs two sources that agree) |\n| `confidence` | `confirmed`: the sources agree on it, two or more as a rule. `provisional`: one source says so. `disputed`: they disagree. An end other than `finished` that one source gives is never `confirmed` |\n| `sources` | `{agreeing, disagreeing}`: how many sources report this final and how many another |\n| `revision` | Grows with every change of the facts, and may skip numbers: a higher revision replaces a lower one, never the other way |\n| `corrected` | `true` when this scoresheet replaces a confirmed one with other facts, or withdraws its confirmation. It stays `true` in later revisions |\n| `updatedAt` | When this revision was published: what `updatedSince` filters on |\n\n**To settle, use only what is confirmed.** `provisional` and `disputed` scoresheets are published\nso you can show them, always marked; a provisional one may change, or turn out to be another\ngame's end. Ask for `confidence=confirmed` (REST and stream) and you get only scoresheets whose\n`confidence` is `confirmed`, a correction among them when it is confirmed itself (`corrected: true`,\nother facts): check what you settled on the old ones. A confirmation can also be withdrawn, rarely:\nthe game's scoresheet becomes `provisional` or `disputed`, with `corrected: true`. That one is not in\n`confidence=confirmed`, which then has no scoresheet for the game (REST answers `404`). The stream tells\nit to every client whose filters include the game, with `confidence=confirmed` too, as a\n`scoresheet.withdrawn` message: check anything you settled on that game.\n- A withdrawal while you were away comes in the messages a resume with `since` replays.\n- A snapshot does not carry it. So after every snapshot of `scores` (not a resume), catch up with\n  `GET /v1/scores?updatedSince=<the newest updatedAt you hold>` **without** the filter: a withdrawal is a\n  `corrected` scoresheet whose `confidence` is not `confirmed`.\n- On REST, `confidence=confirmed` never shows a withdrawal: if you poll instead of following the stream, poll\n  without the filter and settle only on the confirmed ones.\n\nA scoresheet arrives as a `scoresheet` message and at `GET /v1/scores/{eventId}`, and can arrive\nseveral times: each revision replaces the last. Statistics, the timeline and the boxscore can\ncome in a later revision than the score: a boxscore only one source has given so far waits for\nthe second. If you settled on an earlier revision, compare its facts with the new one. A snapshot of `scores` carries the board, each event\nfollowed by its scoresheet if it has one; after a fresh snapshot, catch up on the scoresheets\nof games that already left the board with `GET /v1/scores?updatedSince=<the newest updatedAt\nyou hold>`.\n\n### How long things stay\n\nA scoresheet stays 30 days after its last revision, at `GET /v1/scores` and\n`GET /v1/scores/{eventId}`, also once the game has left the board.\n\n## Grading\n\nOur verdict on every selection of `live`, `pregame` and `props`, by our rules: for a client that wants to\napply the same rules we do. A client with its own rules takes the scoresheet instead.\n\n**Grading only from confirmed scoresheets.** Verdicts are reached only on a scoresheet whose\n`confidence` is `confirmed`. While it is `provisional` or `disputed`, every selection of the game\nis in `held`, with the reason `awaiting_second_source` or `sources_disagree`. In a league only one\nsource covers, the second source never comes: its games stay held.\n\n| Field | What it is |\n|---|---|\n| `eventId`, `product`, `sport`, `league` | The game and the product of lines graded (`live`, `pregame` or `props`) |\n| `basis` | The `revision` of the game's scoresheet the verdicts were reached on |\n| `rules` | The version of our rules applied (below) |\n| `markets` | `{marketId, selections: [{selectionId, outcome, deadHeatFactor}]}`, with the ids of that product's lines |\n| `held` | `{marketId, selectionId, reason}`: the selections without a verdict yet, and why |\n| `complete` | `true` when every selection we grade has its verdict: nothing held, nothing left out. Some market types are not graded at all; their selections are never in `markets` nor in `held`. Markets we leave out without a verdict (see \"What we grade\", below) do not count: `complete` can be `true` while they have none |\n| `revision`, `corrected`, `updatedAt` | As in a scoresheet: `corrected` when a verdict published before changed or was withdrawn |\n\n**What we grade.** Each market type in `/v1/catalog/market-types` says it in\n`gradedPeriodsBySport`: sport id \u2192 the periods in which our grader settles its markets with the data\nour sources give, the same in `live`, `pregame` and `props`. For example\n`{\"id\": \"total\", \u2026, \"gradedPeriodsBySport\": {\"soccer\": [\"match\", \"1h\", \"2h\"], \u2026}}`.\n\n- **Listed:** we grade those markets: each selection gets a verdict, or is held with a reason.\n  It is said per sport, not per league: a league whose results do not carry what a market needs\n  (the score of each period, match statistics such as corners or cards, the goal timeline) gets no\n  verdict on those markets. `live` normally does not offer them there; before the game they are\n  offered, and get no verdict and no `held` entry.\n  A whole-game market read on the periods (half time / full time, both halves) needs the score of each\n  period too: before the game, in such a league, it is held `market_not_graded`.\n- **Not listed:** we do not commit to a verdict. Settle those markets yourself, from the\n  scoresheet; some may still get a verdict, be held or be given `void`.\n- A period is listed only when all of the type's markets in it are graded. When only some lines are\n  (one minute of `result_at_minute`), it is left out.\n- It covers every sport and period v1 can publish, also combinations no sport offers today.\n- Futures and racing are never graded here: their list is empty.\n- A player's statistics (points, yards, hits\u2026 as over/under, exact figures or bands) are graded on\n  the whole game only: those types list `match` and no partial period.\n- The listing follows our grader: it grows when we add one, and loses entries when we stop grading a\n  type. Refresh the catalog daily; do not keep it forever.\n\n**Where it is measured: `gradedLeaguesBySport`.** A soccer player's goals and cards (goalscorers,\n`player_goals`, `player_goals_exact`, `player_to_be_booked`, `player_cards`, `player_to_be_sent_off`) are\ngraded only when we know whether the player played (and, for a pre-match card bet, whether he started).\nHow often we know depends on the league. For these types the catalog also lists, per sport, the league\nids (from `/v1/catalog/leagues`) where we measured that the selections get their verdict when the game is\nsettled:\n\n- over the last 30 days, at least 10 games of the league offered the type, and at least 95% of their\n  selections got a verdict at the settlement;\n- a selection given `void` once the re-checks are over because nobody could tell (our rule \"Not played, or\n  not finished\", below) does not count as graded;\n- a league with less history is not listed: nothing is promised that was not measured; an empty list\n  means no league has passed yet, not that the type is graded everywhere;\n- measured on the pre-match selections, over the games settled more than three days ago; the same\n  grader settles the live ones.\n\nIt is measured once a day. A league may enter or leave the list from one day to the next: offer these\ntypes where it lists the league, and settle them yourself elsewhere. Every other type has an empty\n`gradedLeaguesBySport`: `gradedPeriodsBySport` says it all.\n\n- **The ids are those of the product's lines.** The same game has the same `evt_` in `live`,\n  `pregame` and `props`, and a market may have the same `mkt_` in live and before the game, but its\n  selections are each product's own: match a verdict by the `selectionId` you got with the line,\n  in the product you got it from. One `selectionId` never names two different bets.\n- **One grading per product.** A game's verdicts come in one grading for each product of lines\n  that has verdicts on the game: `pregame` has the verdicts on its main lines, `props` on the rest.\n  Each is `complete` on its own.\n- **`outcome`:** `win`, `lose`, `push` (stake back), `half_win` and `half_lose` (half of the stake\n  wins or loses, half comes back; quarter lines), `void` (stake back). `deadHeatFactor` is the share\n  of the stake that stands when a dead heat applies; `null` otherwise, and today always: no market\n  we grade applies one.\n- **`held` reasons:** `awaiting_second_source` and `sources_disagree` (the scoresheet is not\n  confirmed), `regulation_unknown` (a sport settled on regulation time: no record says whether the\n  game went past it), `props_on_hold` (the boxscore waits for a second source), `no_boxscore`,\n  `player_not_in_boxscore`, `stat_unavailable`, `line_unreadable`, `timeline_unavailable`,\n  `period_score_missing`, `match_stats_missing`, `period_stats_unavailable` (a player's figure for one\n  half, quarter or period: no boxscore we use gives one), `market_not_graded` (we stopped grading the\n  market in the sport after the game was offered: soccer's player assists, shots and pass attempts\n  since 15 November 2026), `participation_unknown` (soccer: a player's goals, goalscorer or card selection\n  of a player whose lineups do not tell whether he played, or, for a pre-match card bet, started; one two lineups\n  put on the bench gets `void`, by our rule \"Player props\" below), `record_unclear` (a soccer player's cards: a booking that\n  may or may not be his, bookings that miss a card of the team counts) and `ungraded`. A selection still held when the re-checks of the game are over (a\n  day after it at the earliest, usually within 60 hours when its result was still being re-checked) is given `void`, in\n  a new revision, once the game's scoresheet is confirmed (as a rule: a re-check that runs late may leave\n  one held); a confirmed game abandoned or retired too, once it no longer waits to resume (what was\n  graded stands). One not finished whose scoresheet is not confirmed stays held, as above. One held for `period_stats_unavailable` or\n  `market_not_graded` never is: we do not grade it, you do. Nor is a game whose scoresheet is never\n  confirmed: its selections stay held (`awaiting_second_source`, `sources_disagree`) until the grading is no\n  longer kept; settle them yourself.\n- A new revision can move a selection from `held` to `markets`. That is not a correction.\n- Verdicts stay 7 days after their last revision, at `GET /v1/{product}/grading` and\n  `GET /v1/{product}/grading/{eventId}` (scoresheets stay 30). The stream's snapshot of\n  `grading` holds no games: after a fresh snapshot, catch up with\n  `GET /v1/{product}/grading?updatedSince=\u2026`. A resume with `since` replays the last 5 000\n  grading messages; from further back you get a snapshot, and catch up the same way.\n\n### Our rules: `2026-11`\n\nThe highlights. A change to any of them is a new version, announced in the changelog.\n\n- **What counts.** The official result on the day of the game; later amendments do not count.\n  A change a referee makes (a goal taken away on review) does not void anything.\n- **Not played, or not finished.** A game postponed to a later day, cancelled, a walkover or a\n  forfeit: every bet is `void`. An abandoned game: what was already decided stands (a total\n  already passed, a completed set); the rest is `void`, unless the game had gone far\n  enough to count. Then its markets are graded on the score when it stopped: in soccer from five\n  minutes before its end (the 85th minute of a 90-minute match), in Australian rules from the\n  80th; for bets taken before the game only, in basketball from five minutes before its end (minute\n  43 in the NBA, 35 in a 40-minute game), in ice hockey and American football from minute 55, and\n  in baseball the moneyline after five innings (a game called level: `void`). An abandoned lacrosse\n  game is `void`, all of it. How far a game went is what the live score last showed, never more, and\n  only when the final is the score it showed then: the match clock in soccer, the innings completed\n  in baseball, the periods completed elsewhere (in practice, a game stopped in overtime). A result\n  that cannot be known within 24 hours is `void`. A game interrupted or suspended may resume, so its\n  grading waits for its end (no verdict meanwhile): 24 hours in tennis, table tennis, cricket and\n  American football, up to 7 days in MLB's postseason, the same calendar day elsewhere (to local\n  midnight where it is played: for a league played in several time zones, a continental competition\n  among them, the earliest; US Eastern time for one we cannot place). If it resumes in time, it is graded on its final (awaited\n  for a few hours past that); if not, it is an abandoned game, on the score when it stopped. In\n  American football, the prematch bets of a game stopped before minute 55 and not known to have\n  resumed that day are all `void`.\n- **Soccer.** Full match and second half: regulation time (ninety minutes and stoppage time),\n  never extra time or the shootout. Goalscorers: own goals and shootout goals do not count, nor do\n  goals in extra time.\n- **Futsal, handball, rugby union and rugby league.** Every market on regulation time, never extra\n  time or a shootout (to qualify and the extra time's own markets excepted). A game past regulation\n  whose regulation score is not certain is not graded on it: held, then `void`.\n- **Basketball and American football.** Full game and second half include overtime; the fourth\n  quarter does not.\n- **Ice hockey.** Full game includes overtime and the shootout (its winner gets one goal);\n  `regulation` markets do not.\n- **Baseball.** Full game includes extra innings; a single inning or the first five innings must\n  be completed.\n- **Set sports.** The match winner, set handicaps and set totals are settled on sets; a match\n  total, handicap or odd/even on points or games, on the points or games of every set. A\n  retirement voids what was not decided; completed sets stand.\n- **Player props.** A player who did not take part: `void`. A pre-match bet on a soccer player's cards\n  needs him to start: a substitute's is `void`. Statistics are the official boxscore\n  of the day, from two sources that agree.\n- **Lines.** A push on a whole-number line gives the stake back; quarter lines split the stake\n  into the two halves around them.\n\n## Errors\n\nEvery REST error has the same body and an HTTP status that matches its code:\n\n```json\n{\"error\": {\"code\": \"invalid_key\", \"message\": \"the key is not valid or was revoked\", \"requestId\": \"req_5f1c\u2026\"}}\n```\n\n| Code | HTTP | Stream close | Meaning |\n|---|---|---|---|\n| `missing_key` | 401 | 4401 | No key sent |\n| `invalid_key` | 401 | 4401 | Unknown or revoked key |\n| `product_not_allowed` | 403 | 4403 | Your key does not include that product |\n| `not_found` | 404 | \u2014 | No such event, product or route |\n| `method_not_allowed` | 405 | \u2014 | The route exists but only answers `GET` |\n| `bad_request` | 400 | 4400 | A parameter is not valid |\n| `rate_limited` | 429 | 4429 | Over your limit (REST sends `Retry-After`), or not keeping up (stream) |\n| `unavailable` | 503 | 1013 | Starting up or re-syncing: retry shortly |\n| `internal` | 500 | 1013 | Our fault: retry, and send us the `requestId` |\n\nQuote the `requestId` (also in the `X-Request-Id` header) when you contact support.\n\n## Versioning\n\nWithin v1 nothing is removed or renamed, and no field changes meaning. A new version may add:\n- products;\n- fields;\n- catalog ids;\n- message types.\n\nIgnore anything you do not know. Anything we retire is announced 90 days ahead, in the changelog.\n"
  },
  "servers": [
    {
      "url": "https://api.lineval.com"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "paths": {
    "/v1/{product}/events": {
      "get": {
        "summary": "Events of a product, without markets, sorted by start time",
        "parameters": [
          {
            "name": "product",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores"
              ]
            }
          },
          {
            "name": "sports",
            "in": "query",
            "required": false,
            "description": "Sport ids, comma separated",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leagues",
            "in": "query",
            "required": false,
            "description": "League ids, comma separated",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "description": "Same as sports, kept for compatibility",
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "league",
            "in": "query",
            "required": false,
            "description": "Same as leagues, kept for compatibility",
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Events starting at or after: ISO 8601 with its zone (2026-11-14T20:00:00Z); a date alone is its midnight UTC. Anything else is a 400",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Events starting at or before: ISO 8601 with its zone (2026-11-14T20:00:00Z); a date alone is its midnight UTC. Anything else is a 400",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "description": "Events updated at or after: ISO 8601 with its zone (2026-11-14T20:00:00Z); a date alone is its midnight UTC. Anything else is a 400",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor of the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Events per page (1-500, default 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventPage"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "401": {
            "description": "`missing_key`, `invalid_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "`product_not_allowed`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "`unavailable`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/{eventId}": {
      "get": {
        "summary": "One game across products: where it is offered (pregame, props, live\u2026) and where its result and its scoresheet are",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventFamily"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "401": {
            "description": "`missing_key`, `invalid_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "`unavailable`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/{product}/events/{eventId}": {
      "get": {
        "summary": "One event with all its markets (or only some, with periods, marketTypes or groups)",
        "parameters": [
          {
            "name": "product",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores"
              ]
            }
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "periods",
            "in": "query",
            "required": false,
            "description": "Period ids, comma separated (e.g. 1h,q1)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "marketTypes",
            "in": "query",
            "required": false,
            "description": "Market type ids, comma separated",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groups",
            "in": "query",
            "required": false,
            "description": "Market group ids, comma separated (e.g. game,player)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventWithMarkets"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "401": {
            "description": "`missing_key`, `invalid_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "`product_not_allowed`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "`unavailable`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/catalog/sports": {
      "get": {
        "summary": "Sports",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SportList"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/catalog/periods": {
      "get": {
        "summary": "Periods, with what each one covers",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeriodList"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/catalog/market-types": {
      "get": {
        "summary": "Market types, with the form of their selections, their group and the sports and periods we grade them in",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketTypeList"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/catalog/market-groups": {
      "get": {
        "summary": "Market groups, to sort an event's markets",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketGroupList"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/catalog/stat-keys": {
      "get": {
        "summary": "Stat keys of scoresheets, per team and per player",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatKeyList"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/{product}/results": {
      "get": {
        "summary": "Results of a product (racing), sorted by when they were published",
        "parameters": [
          {
            "name": "product",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing"
              ]
            }
          },
          {
            "name": "sports",
            "in": "query",
            "required": false,
            "description": "Sport ids, comma separated",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leagues",
            "in": "query",
            "required": false,
            "description": "League ids, comma separated",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "description": "Same as sports, kept for compatibility",
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "league",
            "in": "query",
            "required": false,
            "description": "Same as leagues, kept for compatibility",
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "description": "Results published at or after: ISO 8601 with its zone (2026-11-14T20:00:00Z); a date alone is its midnight UTC. Anything else is a 400",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor of the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page (1-500, default 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultPage"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "401": {
            "description": "`missing_key`, `invalid_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "`product_not_allowed`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "`unavailable`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/{product}/results/{eventId}": {
      "get": {
        "summary": "The result of one event",
        "parameters": [
          {
            "name": "product",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing"
              ]
            }
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "401": {
            "description": "`missing_key`, `invalid_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "`product_not_allowed`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "`unavailable`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scores": {
      "get": {
        "summary": "Scoresheets, sorted by when they were last revised (scores)",
        "parameters": [
          {
            "name": "sports",
            "in": "query",
            "required": false,
            "description": "Sport ids, comma separated",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leagues",
            "in": "query",
            "required": false,
            "description": "League ids, comma separated",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "description": "Same as sports, kept for compatibility",
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "league",
            "in": "query",
            "required": false,
            "description": "Same as leagues, kept for compatibility",
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "description": "Scoresheets revised at or after: ISO 8601 with its zone (2026-11-14T20:00:00Z); a date alone is its midnight UTC. Anything else is a 400",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confidence",
            "in": "query",
            "required": false,
            "description": "confirmed: only scoresheets whose confidence is confirmed (a confirmed correction among them). A withdrawn confirmation is not in it: to see one, take every scoresheet",
            "schema": {
              "type": "string",
              "enum": [
                "confirmed"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor of the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Scoresheets per page (1-500, default 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoresheetPage"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "401": {
            "description": "`missing_key`, `invalid_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "`product_not_allowed`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "`unavailable`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/{product}/grading": {
      "get": {
        "summary": "Our verdicts on a product of lines, sorted by when they were last revised (grading)",
        "parameters": [
          {
            "name": "product",
            "in": "path",
            "required": true,
            "description": "The product of lines graded: your key must include it and grading",
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props"
              ]
            }
          },
          {
            "name": "sports",
            "in": "query",
            "required": false,
            "description": "Sport ids, comma separated",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leagues",
            "in": "query",
            "required": false,
            "description": "League ids, comma separated",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "description": "Same as sports, kept for compatibility",
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "league",
            "in": "query",
            "required": false,
            "description": "Same as leagues, kept for compatibility",
            "schema": {
              "type": "string"
            },
            "deprecated": true
          },
          {
            "name": "updatedSince",
            "in": "query",
            "required": false,
            "description": "Gradings revised at or after: ISO 8601 with its zone (2026-11-14T20:00:00Z); a date alone is its midnight UTC. Anything else is a 400",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "nextCursor of the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Gradings per page (1-500, default 100)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GradingPage"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "401": {
            "description": "`missing_key`, `invalid_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "`product_not_allowed`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "`unavailable`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/{product}/grading/{eventId}": {
      "get": {
        "summary": "Our verdicts on the selections of one game in a product of lines (grading)",
        "parameters": [
          {
            "name": "product",
            "in": "path",
            "required": true,
            "description": "The product of lines graded: your key must include it and grading",
            "schema": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props"
              ]
            }
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Grading"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "401": {
            "description": "`missing_key`, `invalid_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "`product_not_allowed`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "`unavailable`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/scores/{eventId}": {
      "get": {
        "summary": "The scoresheet of one game (scores)",
        "parameters": [
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "confidence",
            "in": "query",
            "required": false,
            "description": "confirmed: only scoresheets whose confidence is confirmed (a confirmed correction among them). A withdrawn confirmation is not in it: to see one, take every scoresheet",
            "schema": {
              "type": "string",
              "enum": [
                "confirmed"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Scoresheet"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "401": {
            "description": "`missing_key`, `invalid_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "`product_not_allowed`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "400": {
            "description": "`bad_request`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "503": {
            "description": "`unavailable`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/catalog/leagues": {
      "get": {
        "summary": "Leagues of what the products of your key hold: games on the board, and the results, scoresheets and verdicts still kept",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeagueList"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "401": {
            "description": "`missing_key`, `invalid_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "`product_not_allowed`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/catalog/books": {
      "get": {
        "summary": "Sportsbooks whose lines the products your key includes carry now (a market's book)",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookList"
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              },
              "Content-Encoding": {
                "description": "gzip, when you send Accept-Encoding: gzip and the body is 1 KB or more",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "304": {
            "description": "Not modified since the ETag sent in If-None-Match"
          },
          "401": {
            "description": "`missing_key`, `invalid_key`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "403": {
            "description": "`product_not_allowed`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/health": {
      "get": {
        "summary": "Whether the API is serving",
        "security": [
          {},
          {
            "bearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "Serving: status ok",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "starting"
                      ]
                    },
                    "products": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "required": [
                          "ready",
                          "status",
                          "events"
                        ],
                        "properties": {
                          "ready": {
                            "type": "boolean",
                            "description": "Loaded and serving"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "ok",
                              "degraded"
                            ],
                            "description": "As in feed.status: degraded means the data may be stale"
                          },
                          "events": {
                            "type": "integer",
                            "description": "How many events it holds now"
                          }
                        }
                      },
                      "description": "Only with your key: each product of your key"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Starting: status starting",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "starting"
                      ]
                    },
                    "products": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "object",
                        "required": [
                          "ready",
                          "status",
                          "events"
                        ],
                        "properties": {
                          "ready": {
                            "type": "boolean",
                            "description": "Loaded and serving"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "ok",
                              "degraded"
                            ],
                            "description": "As in feed.status: degraded means the data may be stale"
                          },
                          "events": {
                            "type": "integer",
                            "description": "How many events it holds now"
                          }
                        }
                      },
                      "description": "Only with your key: each product of your key"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "Appearance": {
        "additionalProperties": false,
        "description": "One player's part in the game as the lineups give it: a fact, with how many sources give it.\nNo rule is applied: whether a prop of a player who did not play is void is the grading's.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "participantId": {
            "description": "The player's par_ id, the one player markets use when they spell the name as the lineup does",
            "title": "Participantid",
            "type": "string"
          },
          "team": {
            "$ref": "#/components/schemas/TeamSide"
          },
          "status": {
            "$ref": "#/components/schemas/AppearanceStatus",
            "description": "started; came_on: a substitute who came on; unused: on the bench and never came on. The status most sources give"
          },
          "minute": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "came_on: the minute he came on, as the game clock gives it, stoppage time apart (90+5 is minute 90, addedTime 5); null otherwise or when not given",
            "title": "Minute"
          },
          "addedTime": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Addedtime"
          },
          "sources": {
            "$ref": "#/components/schemas/SourceCount",
            "description": "agreeing: sources that give this status; disagreeing: sources that give him another"
          }
        },
        "required": [
          "name",
          "participantId",
          "team",
          "status",
          "sources"
        ],
        "title": "Appearance",
        "type": "object"
      },
      "AppearanceStatus": {
        "enum": [
          "started",
          "came_on",
          "unused"
        ],
        "title": "AppearanceStatus",
        "type": "string"
      },
      "BookEntry": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "us: licensed in a US state; offshore: serving US bettors from abroad; null when not known for certain",
            "title": "Region"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "BookEntry",
        "type": "object"
      },
      "BookList": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/BookEntry"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "BookList",
        "type": "object"
      },
      "BookRef": {
        "additionalProperties": false,
        "description": "The sportsbook whose line a market is: from /v1/catalog/books.",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "BookRef",
        "type": "object"
      },
      "Clock": {
        "additionalProperties": false,
        "properties": {
          "period": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Current period id",
            "title": "Period"
          },
          "seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Elapsed seconds in the period",
            "title": "Seconds"
          },
          "running": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Running"
          }
        },
        "title": "Clock",
        "type": "object"
      },
      "Confidence": {
        "description": "``confirmed``: two sources or more agree. ``provisional``: one says so. ``disputed``:\nthey disagree. Settle only on ``confirmed``.",
        "enum": [
          "confirmed",
          "provisional",
          "disputed"
        ],
        "title": "Confidence",
        "type": "string"
      },
      "Dividend": {
        "additionalProperties": false,
        "description": "What one winning combination of a pool pays. Pay ``stake / base * paid``.",
        "properties": {
          "marketType": {
            "description": "Market type id from /v1/catalog/market-types",
            "title": "Markettype",
            "type": "string"
          },
          "marketId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The market it settles; null when no market was published for that pool",
            "title": "Marketid"
          },
          "legs": {
            "description": "The winning combination; empty on a carryover",
            "items": {
              "$ref": "#/components/schemas/DividendLeg"
            },
            "title": "Legs",
            "type": "array"
          },
          "base": {
            "description": "The stake the dividend is quoted for. It differs by pool and by country (2.00, 1.00, 0.50, 0.20, 0.10\u2026): never assume it",
            "title": "Base",
            "type": "number"
          },
          "paid": {
            "description": "Paid per base staked, stake included; 0 on a carryover",
            "title": "Paid",
            "type": "number"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'5 OF 6': a consolation dividend; 'CARRYOVER': nobody won and the pool carries over, so these bets lose",
            "title": "Note"
          }
        },
        "required": [
          "marketType",
          "legs",
          "base",
          "paid"
        ],
        "title": "Dividend",
        "type": "object"
      },
      "DividendLeg": {
        "additionalProperties": false,
        "description": "One position (single-race pools) or one race (multi-race pools) of a winning combination.",
        "properties": {
          "eventId": {
            "description": "The race of this leg",
            "title": "Eventid",
            "type": "string"
          },
          "numbers": {
            "description": "The runners that count here: more than one on a dead heat or a coupled entry; empty when anyRunner",
            "items": {
              "type": "string"
            },
            "title": "Numbers",
            "type": "array"
          },
          "participantIds": {
            "description": "The par_ ids of those runners that the race card listed",
            "items": {
              "type": "string"
            },
            "title": "Participantids",
            "type": "array"
          },
          "anyRunner": {
            "description": "Every runner counts in this leg (a race not run, or 'all')",
            "title": "Anyrunner",
            "type": "boolean"
          }
        },
        "required": [
          "eventId",
          "numbers",
          "participantIds",
          "anyRunner"
        ],
        "title": "DividendLeg",
        "type": "object"
      },
      "ErrorBody": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        },
        "required": [
          "error"
        ],
        "title": "ErrorBody",
        "type": "object"
      },
      "ErrorDetail": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "requestId": {
            "title": "Requestid",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message",
          "requestId"
        ],
        "title": "ErrorDetail",
        "type": "object"
      },
      "Event": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "product": {
            "$ref": "#/components/schemas/Product"
          },
          "sport": {
            "$ref": "#/components/schemas/Ref"
          },
          "league": {
            "$ref": "#/components/schemas/League"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "participants": {
            "items": {
              "$ref": "#/components/schemas/Participant"
            },
            "title": "Participants",
            "type": "array"
          },
          "startAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Startat"
          },
          "status": {
            "$ref": "#/components/schemas/EventStatus"
          },
          "score": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Score"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "clock": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Clock"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "updatedAt": {
            "title": "Updatedat",
            "type": "string"
          },
          "details": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Product specific. Racing: a RaceDetails (race number, distance, surface)",
            "title": "Details"
          },
          "rotation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Rotation"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Games with a home and an away side (live, pregame, props and the scores board); null elsewhere"
          },
          "schedule": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schedule"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Live, pregame, props, futures and the scores board; null in racing"
          }
        },
        "required": [
          "id",
          "product",
          "sport",
          "league",
          "name",
          "participants",
          "status",
          "updatedAt"
        ],
        "title": "Event",
        "type": "object"
      },
      "EventFamily": {
        "additionalProperties": false,
        "description": "Everything about one game across products, by its id: the same evt_ in pregame, props, live and\nresults. Markets are fetched per product through ``href``; filters narrow them.",
        "properties": {
          "event": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Event"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The event (without markets) from the product where it is most current; null once it has left every board and only its result is kept"
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/ProductPresence"
            },
            "title": "Products",
            "type": "array"
          },
          "result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Where its result is, once there is one (racing)",
            "title": "Result"
          },
          "scoresheet": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Where its scoresheet is, once there is one and your key includes scores",
            "title": "Scoresheet"
          },
          "grading": {
            "description": "Where our verdicts are, per product of lines your key includes, once there are some and your key includes grading",
            "items": {
              "$ref": "#/components/schemas/GradingLink"
            },
            "title": "Grading",
            "type": "array"
          }
        },
        "required": [
          "products"
        ],
        "title": "EventFamily",
        "type": "object"
      },
      "EventPage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "title": "Data",
            "type": "array"
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Pass as ?cursor= for the next page; null on the last",
            "title": "Nextcursor"
          }
        },
        "required": [
          "data"
        ],
        "title": "EventPage",
        "type": "object"
      },
      "EventStatus": {
        "enum": [
          "scheduled",
          "live",
          "interrupted",
          "finished",
          "postponed",
          "cancelled",
          "abandoned"
        ],
        "title": "EventStatus",
        "type": "string"
      },
      "EventWithMarkets": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "product": {
            "$ref": "#/components/schemas/Product"
          },
          "sport": {
            "$ref": "#/components/schemas/Ref"
          },
          "league": {
            "$ref": "#/components/schemas/League"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "participants": {
            "items": {
              "$ref": "#/components/schemas/Participant"
            },
            "title": "Participants",
            "type": "array"
          },
          "startAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Startat"
          },
          "status": {
            "$ref": "#/components/schemas/EventStatus"
          },
          "score": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Score"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "clock": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Clock"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "updatedAt": {
            "title": "Updatedat",
            "type": "string"
          },
          "details": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Product specific. Racing: a RaceDetails (race number, distance, surface)",
            "title": "Details"
          },
          "rotation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Rotation"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Games with a home and an away side (live, pregame, props and the scores board); null elsewhere"
          },
          "schedule": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schedule"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Live, pregame, props, futures and the scores board; null in racing"
          },
          "markets": {
            "items": {
              "$ref": "#/components/schemas/Market"
            },
            "title": "Markets",
            "type": "array"
          }
        },
        "required": [
          "id",
          "product",
          "sport",
          "league",
          "name",
          "participants",
          "status",
          "updatedAt",
          "markets"
        ],
        "title": "EventWithMarkets",
        "type": "object"
      },
      "Finisher": {
        "additionalProperties": false,
        "properties": {
          "number": {
            "description": "Saddle cloth or trap number",
            "title": "Number",
            "type": "string"
          },
          "participantId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The runner's par_ id in the event; null when the race card did not list it",
            "title": "Participantid"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "position": {
            "description": "1, 2, 3; two runners share a position on a dead heat",
            "title": "Position",
            "type": "integer"
          }
        },
        "required": [
          "number",
          "name",
          "position"
        ],
        "title": "Finisher",
        "type": "object"
      },
      "Grading": {
        "additionalProperties": false,
        "description": "Our verdicts on the selections of one product of lines for one game. A new revision\nreplaces it whole.",
        "properties": {
          "eventId": {
            "title": "Eventid",
            "type": "string"
          },
          "product": {
            "$ref": "#/components/schemas/Product",
            "description": "The product of lines graded: live, pregame or props"
          },
          "sport": {
            "$ref": "#/components/schemas/Ref"
          },
          "league": {
            "$ref": "#/components/schemas/League"
          },
          "basis": {
            "description": "The revision of the game's scoresheet these verdicts were reached on",
            "title": "Basis",
            "type": "integer"
          },
          "rules": {
            "description": "The version of our rules applied, published in the guide",
            "title": "Rules",
            "type": "string"
          },
          "markets": {
            "description": "The selections with a verdict, by market, with the ids of the product's lines",
            "items": {
              "$ref": "#/components/schemas/MarketResult"
            },
            "title": "Markets",
            "type": "array"
          },
          "held": {
            "description": "The selections without a verdict yet, and why",
            "items": {
              "$ref": "#/components/schemas/HeldSelection"
            },
            "title": "Held",
            "type": "array"
          },
          "complete": {
            "description": "Every selection we grade has its verdict: nothing held, nothing left out (market types we do not grade are never listed). Markets we leave out without a verdict do not count: true says nothing about them",
            "title": "Complete",
            "type": "boolean"
          },
          "revision": {
            "description": "Grows with every change (it may skip numbers): a higher one replaces a lower one",
            "title": "Revision",
            "type": "integer"
          },
          "corrected": {
            "description": "A verdict published before changed or was withdrawn: anything settled on it must be checked",
            "title": "Corrected",
            "type": "boolean"
          },
          "updatedAt": {
            "description": "When this revision was published: what updatedSince filters on",
            "title": "Updatedat",
            "type": "string"
          }
        },
        "required": [
          "eventId",
          "product",
          "sport",
          "league",
          "basis",
          "rules",
          "markets",
          "held",
          "complete",
          "revision",
          "corrected",
          "updatedAt"
        ],
        "title": "Grading",
        "type": "object"
      },
      "GradingLink": {
        "additionalProperties": false,
        "properties": {
          "product": {
            "$ref": "#/components/schemas/Product",
            "description": "The product of lines graded"
          },
          "href": {
            "title": "Href",
            "type": "string"
          }
        },
        "required": [
          "product",
          "href"
        ],
        "title": "GradingLink",
        "type": "object"
      },
      "GradingPage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Grading"
            },
            "title": "Data",
            "type": "array"
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Pass as ?cursor= for the next page; null on the last",
            "title": "Nextcursor"
          }
        },
        "required": [
          "data"
        ],
        "title": "GradingPage",
        "type": "object"
      },
      "HeldMarket": {
        "additionalProperties": false,
        "description": "A market of the race not settled yet: neither paid nor refunded in this result.",
        "properties": {
          "marketType": {
            "title": "Markettype",
            "type": "string"
          },
          "marketId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Marketid"
          },
          "reason": {
            "description": "Why it waits: awaiting_official_dividend (a pick 5 or pick 6 taken from the track's published program, whose official dividend or carryover can come after the race's final result)",
            "title": "Reason",
            "type": "string"
          },
          "until": {
            "description": "When it stops waiting, ISO 8601 in UTC. By then a corrected result either pays it or lists it in refunds",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "marketType",
          "reason",
          "until"
        ],
        "title": "HeldMarket",
        "type": "object"
      },
      "HeldSelection": {
        "additionalProperties": false,
        "properties": {
          "marketId": {
            "title": "Marketid",
            "type": "string"
          },
          "selectionId": {
            "title": "Selectionid",
            "type": "string"
          },
          "reason": {
            "description": "Why it has no verdict yet (see the guide, 'Grading'): awaiting_second_source, sources_disagree, regulation_unknown, props_on_hold, no_boxscore\u2026",
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "marketId",
          "selectionId",
          "reason"
        ],
        "title": "HeldSelection",
        "type": "object"
      },
      "League": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "ISO 3166-1 alpha-2, or null",
            "title": "Country"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "League",
        "type": "object"
      },
      "LeagueEntry": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Country"
          },
          "sport": {
            "description": "Sport id",
            "title": "Sport",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "sport"
        ],
        "title": "LeagueEntry",
        "type": "object"
      },
      "LeagueList": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/LeagueEntry"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "LeagueList",
        "type": "object"
      },
      "Market": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "eventId": {
            "title": "Eventid",
            "type": "string"
          },
          "type": {
            "description": "Market type id from /v1/catalog/market-types",
            "title": "Type",
            "type": "string"
          },
          "name": {
            "description": "Display name, in English",
            "title": "Name",
            "type": "string"
          },
          "period": {
            "description": "Period id from /v1/catalog/periods",
            "title": "Period",
            "type": "string"
          },
          "line": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Line"
          },
          "participant": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ParticipantRef"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The team or player the market is about (team totals, player props)"
          },
          "main": {
            "default": true,
            "description": "False on alternate lines",
            "title": "Main",
            "type": "boolean"
          },
          "book": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BookRef"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The sportsbook whose line this is; null on our own lines. A book's main market keeps its id while its line moves"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "selections": {
            "items": {
              "$ref": "#/components/schemas/Selection"
            },
            "title": "Selections",
            "type": "array"
          },
          "updatedAt": {
            "title": "Updatedat",
            "type": "string"
          },
          "legs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Racing: how many runners one combination names, in order for exacta (2), trifecta (3)\u2026; on a multi-race pool, how many races (pick 4: 4). null elsewhere",
            "title": "Legs"
          },
          "raceEventIds": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Racing multi-race pools: the races the pool covers, in order; the first is this market's event. null elsewhere",
            "title": "Raceeventids"
          }
        },
        "required": [
          "id",
          "eventId",
          "type",
          "name",
          "period",
          "status",
          "selections",
          "updatedAt"
        ],
        "title": "Market",
        "type": "object"
      },
      "MarketGroupEntry": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "MarketGroupEntry",
        "type": "object"
      },
      "MarketGroupList": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/MarketGroupEntry"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "MarketGroupList",
        "type": "object"
      },
      "MarketResult": {
        "additionalProperties": false,
        "properties": {
          "marketId": {
            "title": "Marketid",
            "type": "string"
          },
          "selections": {
            "items": {
              "$ref": "#/components/schemas/SelectionResult"
            },
            "title": "Selections",
            "type": "array"
          }
        },
        "required": [
          "marketId",
          "selections"
        ],
        "title": "MarketResult",
        "type": "object"
      },
      "MarketTypeEntry": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "form": {
            "description": "How to read the selections: see the integration guide, 'Market forms'",
            "title": "Form",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Description"
          },
          "namesBySport": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Sport id -> the name this type takes in that sport",
            "title": "Namesbysport",
            "type": "object"
          },
          "group": {
            "default": "game",
            "description": "Market group id from /v1/catalog/market-groups",
            "title": "Group",
            "type": "string"
          },
          "gradedPeriodsBySport": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "description": "Sport id -> the period ids (from /v1/catalog/periods) in which the grading product settles every market of this type with the data our sources give, the same in every product of lines: a verdict, or held with a reason. Per sport: a league whose results lack the data a market needs gets no verdict on it. Not listed: no verdict promised. Empty when graded nowhere (futures, racing). It follows the grader: entries may be added or removed",
            "title": "Gradedperiodsbysport",
            "type": "object"
          },
          "gradedLeaguesBySport": {
            "additionalProperties": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "description": "Sport id -> the league ids (from /v1/catalog/leagues) where, for a type whose verdict needs to know who played (a soccer player's goals and cards), we measured that it gets one: over the last 30 days, at least 10 games and 95% of their selections graded when the game was settled. A league with less history is not listed. Measured once a day: entries may be added or removed",
            "title": "Gradedleaguesbysport",
            "type": "object"
          }
        },
        "required": [
          "id",
          "name",
          "form",
          "namesBySport",
          "gradedPeriodsBySport"
        ],
        "title": "MarketTypeEntry",
        "type": "object"
      },
      "MarketTypeList": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/MarketTypeEntry"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "MarketTypeList",
        "type": "object"
      },
      "Outcome": {
        "enum": [
          "win",
          "lose",
          "push",
          "half_win",
          "half_lose",
          "void"
        ],
        "title": "Outcome",
        "type": "string"
      },
      "Participant": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Saddle cloth, trap or shirt number",
            "title": "Number"
          },
          "details": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Product specific. Racing: a RunnerDetails (jockey, trainer, weight, scratched, morning line)",
            "title": "Details"
          }
        },
        "required": [
          "id",
          "name",
          "role"
        ],
        "title": "Participant",
        "type": "object"
      },
      "ParticipantRef": {
        "additionalProperties": false,
        "description": "The team, player or competitor a market or selection is about.",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Racing: the runner's saddle cloth or trap number; null elsewhere",
            "title": "Number"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "ParticipantRef",
        "type": "object"
      },
      "PeriodEntry": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description"
        ],
        "title": "PeriodEntry",
        "type": "object"
      },
      "PeriodList": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/PeriodEntry"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "PeriodList",
        "type": "object"
      },
      "PeriodScore": {
        "additionalProperties": false,
        "properties": {
          "period": {
            "description": "Period id from /v1/catalog/periods",
            "title": "Period",
            "type": "string"
          },
          "home": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Home"
          },
          "away": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Away"
          }
        },
        "required": [
          "period"
        ],
        "title": "PeriodScore",
        "type": "object"
      },
      "PlayerLine": {
        "additionalProperties": false,
        "description": "One player's boxscore.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "participantId": {
            "description": "The player's par_ id, the one player markets use when they spell the name as the boxscore does",
            "title": "Participantid",
            "type": "string"
          },
          "team": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamSide"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "null when the boxscore does not say"
          },
          "stats": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                }
              ]
            },
            "description": "Stat key id from /v1/catalog/stat-keys -> value",
            "title": "Stats",
            "type": "object"
          }
        },
        "required": [
          "name",
          "participantId",
          "stats"
        ],
        "title": "PlayerLine",
        "type": "object"
      },
      "Price": {
        "additionalProperties": false,
        "properties": {
          "decimal": {
            "examples": [
              1.909
            ],
            "exclusiveMinimum": 1.0,
            "title": "Decimal",
            "type": "number"
          },
          "american": {
            "examples": [
              -110
            ],
            "title": "American",
            "type": "integer"
          }
        },
        "required": [
          "decimal",
          "american"
        ],
        "title": "Price",
        "type": "object"
      },
      "Product": {
        "enum": [
          "live",
          "pregame",
          "props",
          "futures",
          "racing",
          "scores",
          "grading"
        ],
        "title": "Product",
        "type": "string"
      },
      "ProductPresence": {
        "additionalProperties": false,
        "description": "Where a game is offered: one entry per product that has it now.",
        "properties": {
          "product": {
            "$ref": "#/components/schemas/Product"
          },
          "status": {
            "$ref": "#/components/schemas/EventStatus"
          },
          "markets": {
            "description": "How many markets it has in this product",
            "title": "Markets",
            "type": "integer"
          },
          "updatedAt": {
            "title": "Updatedat",
            "type": "string"
          },
          "href": {
            "description": "The event with its markets in this product",
            "title": "Href",
            "type": "string"
          }
        },
        "required": [
          "product",
          "status",
          "markets",
          "updatedAt",
          "href"
        ],
        "title": "ProductPresence",
        "type": "object"
      },
      "Quote": {
        "additionalProperties": false,
        "description": "A line and its price at one moment: the book's opening line.",
        "properties": {
          "line": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Line"
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Price"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "at": {
            "description": "When the line was posted",
            "title": "At",
            "type": "string"
          }
        },
        "required": [
          "at"
        ],
        "title": "Quote",
        "type": "object"
      },
      "RaceDetails": {
        "additionalProperties": false,
        "description": "``Event.details`` of a race.",
        "properties": {
          "raceNumber": {
            "title": "Racenumber",
            "type": "integer"
          },
          "distance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "As the track states it: '6 1/2 Furlongs', '480m'",
            "title": "Distance"
          },
          "surface": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'Dirt', 'Turf'\u2026; null when not stated",
            "title": "Surface"
          }
        },
        "required": [
          "raceNumber"
        ],
        "title": "RaceDetails",
        "type": "object"
      },
      "RacingResult": {
        "additionalProperties": false,
        "description": "``Result.racing``: the official numbers of a race.",
        "properties": {
          "final": {
            "description": "Settle only on true. false is provisional: show it, never settle on it",
            "title": "Final",
            "type": "boolean"
          },
          "corrected": {
            "description": "These numbers replace ones already published as final: anything settled on those must be checked",
            "title": "Corrected",
            "type": "boolean"
          },
          "offAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "When the race actually started: void any bet accepted after it; null when not known",
            "title": "Offat"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "ISO 4217 code of the dividends, when stated",
            "title": "Currency"
          },
          "finishers": {
            "description": "Positions 1 to 3 (4 where a place pays 4); empty when the race was not run",
            "items": {
              "$ref": "#/components/schemas/Finisher"
            },
            "title": "Finishers",
            "type": "array"
          },
          "dividends": {
            "description": "Win, place and show dividends and every pool that ends in this race. A pool can pay several (dead heats, consolations)",
            "items": {
              "$ref": "#/components/schemas/Dividend"
            },
            "title": "Dividends",
            "type": "array"
          },
          "refunds": {
            "items": {
              "$ref": "#/components/schemas/Refund"
            },
            "title": "Refunds",
            "type": "array"
          },
          "held": {
            "description": "Markets not settled yet: do not settle or refund them until a later result pays or refunds them",
            "items": {
              "$ref": "#/components/schemas/HeldMarket"
            },
            "title": "Held",
            "type": "array"
          },
          "scratched": {
            "items": {
              "$ref": "#/components/schemas/RunnerRef"
            },
            "title": "Scratched",
            "type": "array"
          }
        },
        "required": [
          "final",
          "corrected",
          "finishers",
          "dividends",
          "refunds",
          "scratched"
        ],
        "title": "RacingResult",
        "type": "object"
      },
      "Range": {
        "additionalProperties": false,
        "properties": {
          "min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Min"
          },
          "max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Max"
          }
        },
        "title": "Range",
        "type": "object"
      },
      "Ref": {
        "additionalProperties": false,
        "description": "A catalog entry referenced from an event: id from ``/v1/catalog`` plus its name.",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "Ref",
        "type": "object"
      },
      "Refund": {
        "additionalProperties": false,
        "description": "A pool the track refunded: every bet on it gets its stake back.",
        "properties": {
          "marketType": {
            "title": "Markettype",
            "type": "string"
          },
          "marketId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Marketid"
          }
        },
        "required": [
          "marketType"
        ],
        "title": "Refund",
        "type": "object"
      },
      "Regulation": {
        "additionalProperties": false,
        "description": "A game whose final may not be its score at the end of regulation time: that score, and\nhow the game went on. Every field null: the records do not say whether it went past\nregulation time; do not settle a regulation-time market on the final.",
        "properties": {
          "home": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "At the end of regulation time; null when not known for certain",
            "title": "Home"
          },
          "away": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Away"
          },
          "wentTo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WentTo"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "null when the records do not say: overtime or the shootout in ice hockey, or not even whether it went past regulation time"
          },
          "shootout": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScorePair"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Penalties scored in the shootout; null without one"
          }
        },
        "title": "Regulation",
        "type": "object"
      },
      "Result": {
        "additionalProperties": false,
        "properties": {
          "eventId": {
            "title": "Eventid",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/EventStatus"
          },
          "score": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Score"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "markets": {
            "items": {
              "$ref": "#/components/schemas/MarketResult"
            },
            "title": "Markets",
            "type": "array"
          },
          "settledAt": {
            "title": "Settledat",
            "type": "string"
          },
          "racing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RacingResult"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Racing: finishers, dividends, refunds and scratches; null elsewhere"
          },
          "sport": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The event's sport: a result outlives its event (racing)"
          },
          "league": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/League"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The event's league (the track, in racing)"
          }
        },
        "required": [
          "eventId",
          "status",
          "markets",
          "settledAt"
        ],
        "title": "Result",
        "type": "object"
      },
      "ResultPage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Result"
            },
            "title": "Data",
            "type": "array"
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Pass as ?cursor= for the next page; null on the last",
            "title": "Nextcursor"
          }
        },
        "required": [
          "data"
        ],
        "title": "ResultPage",
        "type": "object"
      },
      "Role": {
        "enum": [
          "home",
          "away",
          "competitor",
          "runner",
          "player"
        ],
        "title": "Role",
        "type": "string"
      },
      "Rotation": {
        "additionalProperties": false,
        "description": "The game's rotation numbers: what sportsbooks print on the board and the ticket. Display and\ncross-reference only, never identity: numbers are reused, and the same game keeps its evt_ id when\nthey change.",
        "properties": {
          "away": {
            "title": "Away",
            "type": "integer"
          },
          "home": {
            "title": "Home",
            "type": "integer"
          },
          "draw": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The draw's number, in games with a three-way result; null otherwise",
            "title": "Draw"
          },
          "official": {
            "description": "true: the market's own numbers. false: provisional, or assigned by us while the market has none; they may change",
            "title": "Official",
            "type": "boolean"
          },
          "added": {
            "default": false,
            "description": "true: a game the books added outside the main schedule; its numbers are the books' own",
            "title": "Added",
            "type": "boolean"
          }
        },
        "required": [
          "away",
          "home",
          "official"
        ],
        "title": "Rotation",
        "type": "object"
      },
      "RunnerDetails": {
        "additionalProperties": false,
        "description": "``Participant.details`` of a runner.",
        "properties": {
          "jockey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The rider; the driver in harness racing; null for greyhounds",
            "title": "Jockey"
          },
          "trainer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Trainer"
          },
          "weightLb": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Weight carried, in pounds",
            "title": "Weightlb"
          },
          "medication": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "As printed in the program, e.g. 'L' (furosemide)",
            "title": "Medication"
          },
          "scratched": {
            "description": "Withdrawn: it will not run",
            "title": "Scratched",
            "type": "boolean"
          },
          "morningLine": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Price"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The track's morning line: its forecast of the odds, printed before betting opens. It is NOT a price anyone can bet at; racing pays what the pool pays"
          },
          "morningLineFraction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The morning line as printed, e.g. '9/2'",
            "title": "Morninglinefraction"
          }
        },
        "required": [
          "scratched"
        ],
        "title": "RunnerDetails",
        "type": "object"
      },
      "RunnerRef": {
        "additionalProperties": false,
        "description": "A runner named by a result.",
        "properties": {
          "number": {
            "description": "Saddle cloth or trap number",
            "title": "Number",
            "type": "string"
          },
          "participantId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The runner's par_ id in the event; null when the race card did not list it",
            "title": "Participantid"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "number",
          "name"
        ],
        "title": "RunnerRef",
        "type": "object"
      },
      "Schedule": {
        "additionalProperties": false,
        "description": "When the game starts, and when it was first going to. A changed start is data, not a rule: each\nclient applies its own.",
        "properties": {
          "originalStartAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The first start time we published for this game; it never changes",
            "title": "Originalstartat"
          },
          "startAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The current start time, the same as the event's startAt",
            "title": "Startat"
          },
          "timeConfirmed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "false while the start time is still to be announced (the date is known); null when unknown",
            "title": "Timeconfirmed"
          }
        },
        "title": "Schedule",
        "type": "object"
      },
      "Score": {
        "additionalProperties": false,
        "properties": {
          "home": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Home"
          },
          "away": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Away"
          },
          "periods": {
            "items": {
              "$ref": "#/components/schemas/PeriodScore"
            },
            "title": "Periods",
            "type": "array"
          }
        },
        "title": "Score",
        "type": "object"
      },
      "ScorePair": {
        "additionalProperties": false,
        "properties": {
          "home": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Home"
          },
          "away": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Away"
          }
        },
        "title": "ScorePair",
        "type": "object"
      },
      "Scoresheet": {
        "additionalProperties": false,
        "description": "The facts of how a game ended. A new revision replaces the sheet whole.",
        "properties": {
          "eventId": {
            "title": "Eventid",
            "type": "string"
          },
          "sport": {
            "$ref": "#/components/schemas/Ref"
          },
          "league": {
            "$ref": "#/components/schemas/League"
          },
          "participants": {
            "description": "Home and away, as in the event",
            "items": {
              "$ref": "#/components/schemas/Participant"
            },
            "title": "Participants",
            "type": "array"
          },
          "startAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Startat"
          },
          "status": {
            "$ref": "#/components/schemas/SheetStatus"
          },
          "score": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScorePair"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The final: sets in set sports. null when the game was not played, or when one source alone says it did not finish: a score nobody saw is never published"
          },
          "periods": {
            "description": "Period ids from /v1/catalog/periods. Only the periods we are sure of: extra time and shootouts are in regulation",
            "items": {
              "$ref": "#/components/schemas/PeriodScore"
            },
            "title": "Periods",
            "type": "array"
          },
          "regulation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Regulation"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "null when the final is the score at the end of regulation time"
          },
          "stats": {
            "items": {
              "$ref": "#/components/schemas/StatLine"
            },
            "title": "Stats",
            "type": "array"
          },
          "timeline": {
            "description": "Goals and cards, in order",
            "items": {
              "$ref": "#/components/schemas/TimelineEntry"
            },
            "title": "Timeline",
            "type": "array"
          },
          "players": {
            "items": {
              "$ref": "#/components/schemas/PlayerLine"
            },
            "title": "Players",
            "type": "array"
          },
          "appearances": {
            "description": "Who started, came on or stayed on the bench, from the lineups (soccer, games with player markets that need it); empty when no lineup was read",
            "items": {
              "$ref": "#/components/schemas/Appearance"
            },
            "title": "Appearances",
            "type": "array"
          },
          "confidence": {
            "$ref": "#/components/schemas/Confidence"
          },
          "sources": {
            "$ref": "#/components/schemas/SourceCount"
          },
          "revision": {
            "description": "Grows with every change of the facts (it may skip numbers): a higher one replaces a lower one",
            "title": "Revision",
            "type": "integer"
          },
          "corrected": {
            "description": "This sheet replaces a confirmed one with other facts, or withdraws its confirmation: anything settled on that one must be checked",
            "title": "Corrected",
            "type": "boolean"
          },
          "updatedAt": {
            "description": "When this revision was published: what updatedSince filters on",
            "title": "Updatedat",
            "type": "string"
          }
        },
        "required": [
          "eventId",
          "sport",
          "league",
          "participants",
          "status",
          "periods",
          "stats",
          "timeline",
          "players",
          "confidence",
          "sources",
          "revision",
          "corrected",
          "updatedAt"
        ],
        "title": "Scoresheet",
        "type": "object"
      },
      "ScoresheetPage": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Scoresheet"
            },
            "title": "Data",
            "type": "array"
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Pass as ?cursor= for the next page; null on the last",
            "title": "Nextcursor"
          }
        },
        "required": [
          "data"
        ],
        "title": "ScoresheetPage",
        "type": "object"
      },
      "Selection": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "description": "Display name, in English",
            "title": "Name",
            "type": "string"
          },
          "side": {
            "$ref": "#/components/schemas/Side"
          },
          "participant": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ParticipantRef"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "line": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Over/under or handicap figure",
            "title": "Line"
          },
          "range": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Range"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Price"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "null when no price is available yet; always null in racing, which is pari-mutuel"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "opening": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Quote"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "A book's market: the first line and price the book posted for this selection; null on our own lines"
          },
          "leg": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Racing multi-race pools: which of the market's races this runner is in, 1 for the first; null elsewhere",
            "title": "Leg"
          },
          "couplingGroup": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Racing: runners of one race with the same coupling group are a coupled entry (1, 1A, 1X): one betting interest. A bet on any of them is a bet on the entry, and a dividend that names any of them pays it. null when the runner is not coupled, and elsewhere",
            "title": "Couplinggroup"
          }
        },
        "required": [
          "id",
          "name",
          "side",
          "status"
        ],
        "title": "Selection",
        "type": "object"
      },
      "SelectionResult": {
        "additionalProperties": false,
        "properties": {
          "selectionId": {
            "title": "Selectionid",
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/Outcome"
          },
          "deadHeatFactor": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "0\u20131 when stakes are reduced",
            "title": "Deadheatfactor"
          }
        },
        "required": [
          "selectionId",
          "outcome"
        ],
        "title": "SelectionResult",
        "type": "object"
      },
      "SheetStatus": {
        "description": "How a game ended. Only ``finished`` was played out; ``retired``, ``abandoned`` and\n``incomplete`` stopped part way (their completed periods stand); the rest were not played.",
        "enum": [
          "finished",
          "postponed",
          "cancelled",
          "abandoned",
          "retired",
          "walkover",
          "not_played",
          "incomplete"
        ],
        "title": "SheetStatus",
        "type": "string"
      },
      "Side": {
        "description": "What a selection backs. ``participant``: the selection's ``participant`` (a player,\na futures candidate); ``other``: read the selection's ``name``.",
        "enum": [
          "home",
          "away",
          "draw",
          "home_or_draw",
          "draw_or_away",
          "home_or_away",
          "over",
          "under",
          "exact",
          "range",
          "yes",
          "no",
          "odd",
          "even",
          "participant",
          "other"
        ],
        "title": "Side",
        "type": "string"
      },
      "SourceCount": {
        "additionalProperties": false,
        "properties": {
          "agreeing": {
            "description": "Sources that report this sheet's final (all that report the game, when it has no score)",
            "title": "Agreeing",
            "type": "integer"
          },
          "disagreeing": {
            "description": "Sources that report another final",
            "title": "Disagreeing",
            "type": "integer"
          }
        },
        "required": [
          "agreeing",
          "disagreeing"
        ],
        "title": "SourceCount",
        "type": "object"
      },
      "SportEntry": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "SportEntry",
        "type": "object"
      },
      "SportList": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/SportEntry"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "SportList",
        "type": "object"
      },
      "StatKeyEntry": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "description": {
            "title": "Description",
            "type": "string"
          },
          "scopes": {
            "description": "team: in a scoresheet's stats; player: in its players' stats",
            "items": {
              "$ref": "#/components/schemas/StatScope"
            },
            "title": "Scopes",
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "scopes"
        ],
        "title": "StatKeyEntry",
        "type": "object"
      },
      "StatKeyList": {
        "additionalProperties": false,
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/StatKeyEntry"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "StatKeyList",
        "type": "object"
      },
      "StatLine": {
        "additionalProperties": false,
        "properties": {
          "key": {
            "description": "Stat key id from /v1/catalog/stat-keys",
            "title": "Key",
            "type": "string"
          },
          "home": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Home"
          },
          "away": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Away"
          }
        },
        "required": [
          "key"
        ],
        "title": "StatLine",
        "type": "object"
      },
      "StatScope": {
        "enum": [
          "team",
          "player"
        ],
        "title": "StatScope",
        "type": "string"
      },
      "Status": {
        "description": "Of a market or a selection. ``suspended`` keeps the last price, for display;\nit cannot be bet. ``closed`` is final: the market will not reopen.",
        "enum": [
          "open",
          "suspended",
          "closed"
        ],
        "title": "Status",
        "type": "string"
      },
      "TeamSide": {
        "enum": [
          "home",
          "away"
        ],
        "title": "TeamSide",
        "type": "string"
      },
      "TimelineEntry": {
        "additionalProperties": false,
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TimelineType"
          },
          "minute": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The minute as the game clock gives it; stoppage time apart (a goal at 45+2 is minute 45, addedTime 2)",
            "title": "Minute"
          },
          "addedTime": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Addedtime"
          },
          "team": {
            "$ref": "#/components/schemas/TeamSide",
            "description": "A goal: the side it counted for (an own goal counts for the opponent of the player who scored it). A card: the player's side"
          },
          "player": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Player"
          },
          "participantId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The player's par_ id, the one player markets use",
            "title": "Participantid"
          },
          "ownGoal": {
            "default": false,
            "title": "Owngoal",
            "type": "boolean"
          },
          "penalty": {
            "default": false,
            "title": "Penalty",
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "team"
        ],
        "title": "TimelineEntry",
        "type": "object"
      },
      "TimelineType": {
        "enum": [
          "goal",
          "yellow_card",
          "red_card"
        ],
        "title": "TimelineType",
        "type": "string"
      },
      "WentTo": {
        "enum": [
          "extra_time",
          "shootout"
        ],
        "title": "WentTo",
        "type": "string"
      }
    }
  }
}
