{
  "openapi": "3.1.0",
  "info": {
    "title": "MoviOdds bet365 Odds API",
    "version": "2026.10",
    "summary": "Free live bet365 odds for soccer, tennis, basketball, American football, ice hockey, baseball, rugby, cricket and Australian rules: every market, pre-match and in-play.",
    "description": "MoviOdds serves exclusively bet365 odds for 24 sports (soccer, tennis, basketball, American football, ice hockey, baseball, rugby, cricket, esports and more, see the sport parameter): every market bet365 prices for a match, pre-match and in-play. Soccer is the default; pass sport=<key> (see the sport parameter), or sport=all, to /odds and /catalog for other sports. Load the board with GET /odds, then keep it current over the WebSocket at wss://moviodds.com/ws (send {\"op\":\"subscribe\"}, optionally with \"fixtures\" and \"groups\" lists, or \"leagues\" and \"sports\" to follow whole competitions with new matches included; you receive a snapshot per match, then delta messages as prices change, and a remove message when a market closes or a match leaves the board). WebSockets are not describable in OpenAPI, so the stream is documented at https://moviodds.com/doc.\n\nNo key is needed. POST /betbuilder/price needs Bet Builder access: a Bet Builder key, or an account API key with the Bet Builder add-on (open a ticket on our Discord: https://discord.gg/aXNfRCjtNq).\n\nMoviOdds is an independent project and is not affiliated with or endorsed by bet365.",
    "contact": {
      "name": "MoviOdds on Discord",
      "url": "https://discord.gg/aXNfRCjtNq"
    }
  },
  "externalDocs": {
    "description": "Guide: load the board, stream changes, every market",
    "url": "https://moviodds.com/doc"
  },
  "servers": [
    {
      "url": "https://moviodds.com"
    }
  ],
  "tags": [
    {
      "name": "Odds",
      "description": "Matches and their current bet365 prices"
    },
    {
      "name": "Bet Builder",
      "description": "bet365's real combined price for a set of legs",
      "externalDocs": {
        "url": "https://moviodds.com/docs/betbuilder/"
      }
    },
    {
      "name": "Status",
      "description": "Service health"
    },
    {
      "name": "WebSocket",
      "description": "Live price updates pushed over one connection"
    },
    {
      "name": "Other endpoints",
      "description": "Older soccer endpoints that fetch from bet365 on every call. Slower and narrower than /odds and the WebSocket; 120 requests a minute per IP, 429 with Retry-After when busy."
    }
  ],
  "paths": {
    "/odds": {
      "get": {
        "tags": [
          "Odds"
        ],
        "operationId": "getOdds",
        "summary": "Every match and its current odds",
        "description": "Every listed match with its current quotes. Matches not priced yet carry an empty quotes array. Use the filters to fetch a slice instead of the whole board. Rate limit: 300 requests per minute per IP; for live updates use the WebSocket instead of polling. Send Accept-Encoding: gzip: a whole sport is about 100 MB raw and about 8 MB gzipped. Without an API key, a response over about 5 MB requested without gzip is still served raw, but only once per minute per IP (faster repeats get 429 raw_rate_limited) and only a few at a time across all users (503 raw_busy). Gzip requests skip both limits; with a key big raw responses aren't limited this way.",
        "parameters": [
          {
            "name": "sport",
            "in": "query",
            "description": "Which sport to return. Default soccer; all = every sport. Every match carries its own sport field.",
            "schema": {
              "type": "string",
              "enum": [
                "soccer",
                "tennis",
                "basketball",
                "american_football",
                "ice_hockey",
                "baseball",
                "rugby_union",
                "rugby_league",
                "cricket",
                "australian_rules",
                "table_tennis",
                "volleyball",
                "handball",
                "badminton",
                "esports",
                "darts",
                "snooker",
                "boxing",
                "mma",
                "futsal",
                "bandy",
                "floorball",
                "field_hockey",
                "gaelic_sports",
                "all"
              ],
              "default": "soccer"
            }
          },
          {
            "name": "league",
            "in": "query",
            "description": "Only matches in these competitions. Comma-separated league names as /catalog lists them, for example NBA, WNBA, NCAAB or England Premier League. Case doesn't matter. leagues= works too. On its own it covers every sport. With sport= it stays within that sport. An unknown name returns an empty board.",
            "schema": {
              "type": "string",
              "examples": [
                "NBA,WNBA,NCAAB"
              ]
            }
          },
          {
            "name": "in_play",
            "in": "query",
            "description": "1 = only matches currently in play.",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "true"
              ]
            }
          },
          {
            "name": "groups",
            "in": "query",
            "description": "Comma-separated market group ids; only quotes in these groups are returned. Soccer Full Time Result is 40 before kickoff and 1777 in play (once a soccer match is in play, 40 and its other pre-match markets stay suspended at their last price and stop updating); tennis To Win Match is 83 before the match and To Win (67, line \"Match\") in play. See https://moviodds.com/docs/markets/. Other sports: the match winner is the selection with line \"To Win\" in the \"Game\" market (side = the team); its group id can differ between pre-match and in-play.",
            "schema": {
              "type": "string",
              "examples": [
                "40,1777"
              ]
            }
          },
          {
            "name": "links",
            "in": "query",
            "description": "1 = add a ready-made bet365 deep-link object to every match (the links property). Opt-in so the default board is unchanged. See the MatchLinks schema; the host is server-configured (default www.bet365.com) and works on any regional domain.",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "true"
              ]
            }
          },
          {
            "name": "stats",
            "in": "query",
            "required": false,
            "description": "1 = attach each in-play match's live stats (the stats property) when match stats are on server-side. Opt-in: without it no stats field appears. The WebSocket equivalent is \"stats\": true on subscribe. Soccer stats also carry each team's form (last results, newest first), substitution minutes per player (subbed_on / subbed_off) and standings, the competition's live league table (see doc section 10).",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "true"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The board (or the filtered slice).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OddsResponse"
                }
              }
            }
          },
          "429": {
            "description": "Either the general rate limit, or raw_rate_limited: a response over about 5 MB was asked for without Accept-Encoding: gzip and this IP already got one in the last minute (requests without an API key only). Retry-After says how many seconds to wait. Send Accept-Encoding: gzip to skip this limit.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until you can retry."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "raw_rate_limited"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "The server is busy, or raw_busy: too many big uncompressed responses are going out right now (requests without an API key only). Retry-After is 5 seconds. Send Accept-Encoding: gzip to skip this limit.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until you can retry."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "raw_busy"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {}
        ]
      }
    },
    "/history": {
      "get": {
        "tags": [
          "Odds"
        ],
        "operationId": "getHistory",
        "summary": "A selection's recorded price timeline",
        "description": "Recorded price points for a match, oldest first. Each point carries the same selection-identity fields as /odds (group_id, group_name, market_id, sel_id, label, and side/line/handicap/n2 where the market uses them), so a point maps to a team/side/line without re-fetching /odds. Narrow with group, sel and a from/to window; results are capped at limit rows (default 5000, max 50000; the newest within the window are kept). odds_frac is derived from odds_dec, which is authoritative. A match with separate pre-match and live ids is returned whole: pass either id; fixture_ids lists the ids included. A busy or timed-out archive read answers 503 with a Retry-After header. Rate limit: 120 requests per minute per IP.",
        "parameters": [
          {
            "name": "fi",
            "in": "query",
            "required": true,
            "description": "The match (fixture) id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group",
            "in": "query",
            "description": "Only quotes in this market-group id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sel",
            "in": "query",
            "description": "Only this selection id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Window start: RFC3339 (e.g. 2026-10-04T12:00:00Z) or Unix seconds.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Window end: RFC3339 or Unix seconds.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max rows (default 5000, max 50000).",
            "schema": {
              "type": "integer",
              "default": 5000,
              "maximum": 50000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The price timeline (oldest first).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fixture_id": {
                      "type": "string"
                    },
                    "fixture_ids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The ids included: the requested id plus its linked pre-match or live id."
                    },
                    "count": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean",
                      "description": "True when the row cap was hit; narrow the window or filter and page back."
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "group": {
                      "type": "string"
                    },
                    "sel": {
                      "type": "string"
                    },
                    "points": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "ts": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "fixture_id": {
                            "type": "string",
                            "description": "The id that recorded this point. Present only when fixture_ids has more than one id."
                          },
                          "group_id": {
                            "type": "string"
                          },
                          "group_name": {
                            "type": "string",
                            "description": "Market display name (same as /odds). Present when known."
                          },
                          "period": {
                            "type": "string",
                            "description": "The period part of a renamed period market's name: the game, set, goal, over or time window it is about. bet365 keeps one group_id for the whole family and renames it as the match goes on (\"Game 1 Player Totals\" then \"Game 2 Player Totals\"), so period tells the two apart: \"2\" there, \"40:00-49:59\" for \"Next 10 Minutes (40:00 - 49:59)\", \"1/2/1\" for \"Set 1 - Game 2 1st Point\", \"1-3\" for the score base in \"Asian Handicap (1-3)\". Several numbers are joined with \"/\" in name order. Only the numbers that say which period it is count; lines like 2.5, \"3-Way\" and team names do not. Absent when the name has no period."
                          },
                          "market_key": {
                            "type": "string",
                            "description": "group_id + \"|\" + period (e.g. \"2776|2\"), present only when period is. Settle on market_key + sel_id, falling back to group_id when market_key is absent: the same sel_id can carry on into the next period under the same group_id."
                          },
                          "market_id": {
                            "type": "string"
                          },
                          "sel_id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "side": {
                            "type": "string",
                            "description": "Selection side where the market uses one (e.g. 'O'/'U', 'H'/'A'); same field as /odds. Present when non-empty."
                          },
                          "line": {
                            "type": "string",
                            "description": "The market line where applicable (e.g. '2.5'); same field as /odds. Present when non-empty."
                          },
                          "handicap": {
                            "type": "string",
                            "description": "The handicap where applicable; same field as /odds. Present when non-empty."
                          },
                          "n2": {
                            "type": "string",
                            "description": "Second participant where the market names one; same field as /odds. Present when non-empty."
                          },
                          "odds_dec": {
                            "type": "number"
                          },
                          "odds_frac": {
                            "type": "string",
                            "description": "Derived display fraction; odds_dec is authoritative."
                          },
                          "suspended": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "ts",
                          "odds_dec",
                          "suspended"
                        ]
                      }
                    }
                  },
                  "required": [
                    "fixture_id",
                    "count",
                    "points"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {}
        ]
      }
    },
    "/closing": {
      "get": {
        "tags": [
          "Odds"
        ],
        "operationId": "getClosing",
        "summary": "Each selection's closing line",
        "description": "Per selection, the pre-match close (pre_close: the last price recorded at or before kickoff) and the last recorded price (last). Each selection row and its pre_close/last points carry the same selection-identity fields as /odds (group_name, and side/line/handicap/n2 where the market uses them), so a row maps to a team/side/line without a /odds round-trip. bet365 reuses one market for successive periods and renames it (e.g. Next 10 Minutes (40:00-49:59) then (50:00-59:59)), so a renamed period market yields one closing row per period name, told apart by group_name. A match with separate pre-match and live ids is returned whole: pass either id; fixture_ids lists the ids included and prematch_id names the pre-match one. pre_close_basis says how the close was found (kickoff, prematch-records or omitted); kickoff_estimated is true when the kickoff is an estimate, and an estimate is never used to pick the close. closed is false while the match is upcoming (pre_close is provisional) and true once it has kicked off, gone in play, or finished. A busy or timed-out archive read answers 503 with a Retry-After header. Rate limit: 120 requests per minute per IP.",
        "parameters": [
          {
            "name": "fi",
            "in": "query",
            "required": true,
            "description": "The match (fixture) id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The closing line per selection.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fixture_id": {
                      "type": "string"
                    },
                    "fixture_ids": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The ids included: the requested id plus its linked pre-match or live id."
                    },
                    "prematch_id": {
                      "type": "string",
                      "description": "The pre-match anchor id pre_close was taken from (present when a distinct pre-match id was identified)."
                    },
                    "kickoff_utc": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "kickoff_known": {
                      "type": "boolean"
                    },
                    "kickoff_estimated": {
                      "type": "boolean",
                      "description": "True when kickoff_utc is a live-derived estimate (first time seen in play, later than the true start), not bet365's scheduled kickoff. An estimated kickoff is never used as the pre_close cutoff."
                    },
                    "pre_close_basis": {
                      "type": "string",
                      "enum": [
                        "kickoff",
                        "prematch-records",
                        "omitted"
                      ],
                      "description": "How pre_close was chosen: 'kickoff' = last price at/<=the real scheduled kickoff; 'prematch-records' = no reliable kickoff but a separate live id exists, so the last price recorded under the pre-match id; 'omitted' = no pre-match close is reported (a live-only game, or no price was recorded at/before the real kickoff). When 'omitted', selections carry no pre_close."
                    },
                    "in_play": {
                      "type": "boolean"
                    },
                    "closed": {
                      "type": "boolean",
                      "description": "False while the match is upcoming (pre_close just mirrors the current pre-match price and keeps moving until kickoff); true once the match has kicked off, gone in play, or finished. Treat pre_close as a settled closing line only when closed is true."
                    },
                    "selection_count": {
                      "type": "integer"
                    },
                    "selections": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "group_id": {
                            "type": "string"
                          },
                          "group_name": {
                            "type": "string",
                            "description": "Market display name (same as /odds). Present when known."
                          },
                          "period": {
                            "type": "string",
                            "description": "The period part of a renamed period market's name: the game, set, goal, over or time window it is about. bet365 keeps one group_id for the whole family and renames it as the match goes on (\"Game 1 Player Totals\" then \"Game 2 Player Totals\"), so period tells the two apart: \"2\" there, \"40:00-49:59\" for \"Next 10 Minutes (40:00 - 49:59)\", \"1/2/1\" for \"Set 1 - Game 2 1st Point\", \"1-3\" for the score base in \"Asian Handicap (1-3)\". Several numbers are joined with \"/\" in name order. Only the numbers that say which period it is count; lines like 2.5, \"3-Way\" and team names do not. Absent when the name has no period."
                          },
                          "market_key": {
                            "type": "string",
                            "description": "group_id + \"|\" + period (e.g. \"2776|2\"), present only when period is. Settle on market_key + sel_id, falling back to group_id when market_key is absent: the same sel_id can carry on into the next period under the same group_id."
                          },
                          "market_id": {
                            "type": "string"
                          },
                          "sel_id": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string"
                          },
                          "side": {
                            "type": "string",
                            "description": "Selection side where the market uses one (e.g. 'O'/'U', 'H'/'A'); same field as /odds. Present when non-empty."
                          },
                          "line": {
                            "type": "string",
                            "description": "The market line where applicable (e.g. '2.5'); same field as /odds. Present when non-empty."
                          },
                          "handicap": {
                            "type": "string",
                            "description": "The handicap where applicable; same field as /odds. Present when non-empty."
                          },
                          "n2": {
                            "type": "string",
                            "description": "Second participant where the market names one; same field as /odds. Present when non-empty."
                          },
                          "pre_close": {
                            "$ref": "#/components/schemas/ClosingPricePoint"
                          },
                          "last": {
                            "$ref": "#/components/schemas/ClosingPricePoint"
                          }
                        },
                        "required": [
                          "sel_id"
                        ]
                      }
                    }
                  },
                  "required": [
                    "fixture_id",
                    "kickoff_known",
                    "selections"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {}
        ]
      }
    },
    "/catalog": {
      "get": {
        "tags": [
          "Odds"
        ],
        "operationId": "getCatalog",
        "summary": "Every match, without odds",
        "description": "All catalogued matches (pre-match and in-play) with names, league and kickoff. Use it to find a match id.",
        "responses": {
          "200": {
            "description": "The match list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "sweeps": {
                      "type": "integer",
                      "description": "How many catalog refreshes have run since start."
                    },
                    "fixtures": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Fixture"
                      }
                    }
                  },
                  "required": [
                    "count",
                    "fixtures"
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {}
        ],
        "parameters": [
          {
            "name": "sport",
            "in": "query",
            "description": "Which sport to return. Default soccer; all = every sport. Every match carries its own sport field.",
            "schema": {
              "type": "string",
              "enum": [
                "soccer",
                "tennis",
                "basketball",
                "american_football",
                "ice_hockey",
                "baseball",
                "rugby_union",
                "rugby_league",
                "cricket",
                "australian_rules",
                "table_tennis",
                "volleyball",
                "handball",
                "badminton",
                "esports",
                "darts",
                "snooker",
                "boxing",
                "mma",
                "futsal",
                "bandy",
                "floorball",
                "field_hockey",
                "gaelic_sports",
                "all"
              ],
              "default": "soccer"
            }
          },
          {
            "name": "league",
            "in": "query",
            "description": "Only matches in these competitions. Comma-separated league names as this endpoint lists them. Case doesn't matter. leagues= works too. On its own it covers every sport.",
            "schema": {
              "type": "string",
              "examples": [
                "NBA,WNBA,NCAAB"
              ]
            }
          },
          {
            "name": "stats",
            "in": "query",
            "required": false,
            "description": "1 = attach each in-play match's live stats (the stats property) when match stats are on server-side. Opt-in: without it no stats field appears. Soccer stats also carry each team's form, substitution minutes per player (subbed_on / subbed_off) and standings, the competition's live league table (see doc section 10).",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "true"
              ]
            }
          }
        ]
      }
    },
    "/snapshot": {
      "get": {
        "tags": [
          "Odds"
        ],
        "operationId": "getSnapshot",
        "summary": "One match's current odds",
        "parameters": [
          {
            "name": "fi",
            "in": "query",
            "required": true,
            "description": "Match id from /catalog or /odds.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Every current quote for the match.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fixture": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer",
                      "description": "Number of quotes."
                    },
                    "groups": {
                      "type": "integer",
                      "description": "Number of markets."
                    },
                    "server_time": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "polled_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When this match was last refreshed. Absent if never seen."
                    },
                    "quotes": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "items": {
                        "$ref": "#/components/schemas/Quote"
                      }
                    }
                  },
                  "required": [
                    "fixture",
                    "count",
                    "groups",
                    "server_time"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {}
        ]
      }
    },
    "/betbuilder/price": {
      "post": {
        "tags": [
          "Bet Builder"
        ],
        "operationId": "priceBetBuilder",
        "summary": "bet365's Bet Builder price for one or more slips",
        "description": "Returns bet365's real combined price for each slip (2-12 legs from one pre-match match). This is not the single odds multiplied together: bet365 adjusts for linked legs. Leg ids are sel_id values from /snapshot. Needs an API key; ask on Discord.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slips": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "properties": {
                        "fixture": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        },
                        "legs": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 12,
                          "items": {
                            "type": "string"
                          },
                          "description": "sel_id values."
                        }
                      },
                      "required": [
                        "fixture",
                        "legs"
                      ]
                    }
                  }
                },
                "required": [
                  "slips"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One result per slip, in request order.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_time": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SlipResult"
                      }
                    }
                  },
                  "required": [
                    "server_time",
                    "results"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Status"
        ],
        "operationId": "getHealth",
        "summary": "Service status",
        "responses": {
          "200": {
            "description": "Status and cache size.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "examples": [
                        "ok"
                      ]
                    },
                    "warming": {
                      "type": "boolean",
                      "description": "True right after a restart while the board loads."
                    },
                    "catalog_fixtures": {
                      "type": "integer"
                    },
                    "cache_fixtures": {
                      "type": "integer"
                    },
                    "cache_quotes": {
                      "type": "integer"
                    },
                    "last_change_unix": {
                      "type": "integer"
                    },
                    "last_fixture_seen_by_sport": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "description": "Per sport, the most recent time a fixture for that sport was seen in a catalog sweep. A recent timestamp means the sport is being read (a quiet off-week); a stale or missing one suggests a broken sport."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": []
      }
    },
    "/outrights": {
      "get": {
        "tags": [
          "Odds"
        ],
        "operationId": "getOutrights",
        "summary": "Outright / futures markets (field winners)",
        "description": "Outright (futures) markets: a field of participants priced for one winner question, such as the Formula 1 drivers and constructors championships, a golf tournament or cycling race winner, or a season future (Super Bowl, NFL/NCAAF/CFL outright/conference/division, NBA Championship, Stanley Cup, World Series, AFL and AFL Women Grand Final, Rugby World Cup, NRL, plus MVP, regular season awards, Heisman, winning conference, Brownlow, team perfect/winless record, team undefeated, final exact forecast, and each top soccer league's winner, top goalscorer and relegation). The per-team grids are also served: to make the playoffs (a Yes/No selection per team) and regular season wins (an Over/Under selection per team, carrying the team's line) -- each cell is a selection with side and, for over/under, line. Separate from /odds, which has head-to-head match odds. Prices update every few minutes. When futures are not available for a sport the response is {\"enabled\": false}.",
        "responses": {
          "200": {
            "description": "The outright events for the sport, each with its markets and current prices. A valid sport with no futures (a covered sport still warming, or a real sport the feature does not cover) returns an empty events list. When the whole feature is off: {\"enabled\": false}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "sport": {
                      "type": "string",
                      "description": "Echo of the requested sport; 'all' when every sport was requested (or sport was omitted)."
                    },
                    "event_count": {
                      "type": "integer"
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OutrightEvent"
                      }
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Present and false only when futures are not available."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unknown sport key: {\"error\":\"unknown sport key: X\"}. Returned when sport is not a valid sport key. A valid sport with no futures is a 200 with an empty events list, not a 400."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {}
        ],
        "parameters": [
          {
            "name": "sport",
            "in": "query",
            "description": "Which sport's futures to return. all (or omitted) returns every sport that has futures. An unknown key is a 400.",
            "schema": {
              "type": "string",
              "enum": [
                "formula1",
                "motorbikes",
                "nascar",
                "supercars",
                "motorsport",
                "golf",
                "cycling",
                "american_football",
                "basketball",
                "ice_hockey",
                "baseball",
                "rugby_union",
                "rugby_league",
                "australian_rules",
                "soccer",
                "horse_racing_futures",
                "greyhound_futures",
                "harness_futures",
                "all"
              ],
              "default": "all"
            }
          }
        ]
      }
    },
    "/results": {
      "get": {
        "tags": [
          "Odds"
        ],
        "operationId": "getResults",
        "summary": "Results / settlement (finished matches, final & period scores)",
        "description": "Finished matches with the final score, per-period scores where available (halves for soccer, sets for tennis, table tennis, volleyball and badminton, quarters for basketball and American football, periods for ice hockey, innings for baseball), a status and the time the match finished. Baseball innings come from bet365's own inning scores when we can't split them ourselves, and only when they add up to the final score. status is finished when the match reached full time (a player or side won the required sets, or baseball reached the 9th inning), and unknown when it stopped before that, usually because it was abandoned, suspended or postponed, or a tennis retirement (which bet365 does not expose); the last score is still returned. An overtime flag and a note are added when the match was decided beyond regulation, and cricket carries its run result and score format (wickets/runs per innings) in the note.",
        "responses": {
          "200": {
            "description": "The finished matches for the sport, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sport": {
                      "type": "string"
                    },
                    "date": {
                      "type": "string",
                      "description": "Echo of the date filter (UTC, YYYY-MM-DD) when supplied."
                    },
                    "count": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MatchResult"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing/invalid sport, or a malformed date / fi."
          },
          "503": {
            "description": "Results tracking is disabled (RESULTS_DISABLE set or no sports enabled)."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {}
        ],
        "parameters": [
          {
            "name": "sport",
            "in": "query",
            "required": true,
            "description": "Which sport's finished matches to return (e.g. soccer, tennis, basketball, ice_hockey, american_football, volleyball).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Restrict to matches that finished on this UTC calendar day (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "fi",
            "in": "query",
            "required": false,
            "description": "Restrict to a single bet365 fixture id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stats",
            "in": "query",
            "required": false,
            "description": "1 = attach each result's full-time stats (the stats property) when match stats are on server-side, baseball and American football results included. Opt-in: without it no stats field appears.",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "true"
              ]
            }
          }
        ]
      }
    },
    "/racing": {
      "get": {
        "tags": [
          "Odds"
        ],
        "operationId": "getRacing",
        "summary": "Racing board (horse / harness / greyhound)",
        "description": "The racing board: today's meetings, races and runners with the Fixed Win price (decimal and fractional) and each-way terms, for thoroughbred and North American horse racing (code 'horse'), harness/trots ('harness') and greyhounds ('greyhound'). Prices stream live over the WebSocket; the response is the last-good snapshot. Separate from /odds (racing is not head-to-head match-shaped). An empty read is never treated as 'closed' -- last-good runners and prices are kept. When the feature is off: {\"enabled\": false}.",
        "responses": {
          "200": {
            "description": "The cached meetings and races for the code, each race with its runners. When the whole feature is off: {\"enabled\": false}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_time": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Server clock (UTC) when the response was built."
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Same as server_time; kept for backward compatibility."
                    },
                    "code": {
                      "type": "string",
                      "description": "Echo of the requested code; 'all' when every code was requested (or code was omitted)."
                    },
                    "meetings": {
                      "type": "array",
                      "description": "The meetings for the code, narrowed to the ?meeting= filter when one is given (in step with races).",
                      "items": {
                        "$ref": "#/components/schemas/RaceMeeting"
                      }
                    },
                    "race_count": {
                      "type": "integer"
                    },
                    "races": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Race"
                      }
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Present and false only when racing is off."
                    }
                  }
                },
                "example": {
                  "server_time": "2026-10-06T02:10:00Z",
                  "generated_at": "2026-10-06T02:10:00Z",
                  "code": "harness",
                  "meetings": [
                    {
                      "meeting_id": "21174179",
                      "code": "harness",
                      "class_id": "88",
                      "region": "103",
                      "course": "Menangle",
                      "date": "20261006"
                    }
                  ],
                  "race_count": 1,
                  "races": [
                    {
                      "race_id": "202291364",
                      "meeting_id": "21174179",
                      "code": "harness",
                      "class_id": "88",
                      "region": "103",
                      "number": 1,
                      "name": "Race 1 Menangle",
                      "full_name": "Yirribee Pacing Stud Cattlewash Trotters Mobile",
                      "start_type": "Mobile",
                      "course": "Menangle",
                      "date": "20261006",
                      "jump_utc": "2026-10-06T02:14:00Z",
                      "going": null,
                      "distance": "1609m",
                      "class": null,
                      "each_way": {
                        "places": 3,
                        "frac_num": 1,
                        "frac_den": 5,
                        "raw": "E/W 1/5 1-2-3"
                      },
                      "status": "open",
                      "in_play": false,
                      "last_status_change": "2026-10-06T01:40:00Z",
                      "runners": [
                        {
                          "sel_id": "140712233",
                          "number": 3,
                          "name": "Island Frankie",
                          "jockey": "Cameron Hart",
                          "win_frac": "2/1",
                          "win_odds": 3.0,
                          "scratched": false,
                          "suspended": false
                        },
                        {
                          "sel_id": "140712234",
                          "number": 9,
                          "name": "Casualconnection",
                          "jockey": "Jack Trainor",
                          "win_frac": null,
                          "win_odds": null,
                          "scratched": false,
                          "suspended": true
                        }
                      ],
                      "updated_at": "2026-10-06T02:09:58Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameter: an unknown code (must be horse|harness|greyhound|all), a non-numeric meeting id, or a negative near. The body carries a clear { \"error\": ... } message."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {}
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "description": "Which racing code to return. all (or omitted) returns every code.",
            "schema": {
              "type": "string",
              "enum": [
                "horse",
                "harness",
                "greyhound",
                "all"
              ],
              "default": "all"
            }
          },
          {
            "name": "meeting",
            "in": "query",
            "required": false,
            "description": "Restrict to one meeting (track) by its bet365 meeting id. Numeric; narrows both races[] and meetings[]. A non-numeric value is a 400.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "near",
            "in": "query",
            "required": false,
            "description": "Return only the next N races by jump time (from now). 0 or omitted returns all.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ]
      }
    },
    "/racing/race": {
      "get": {
        "tags": [
          "Odds"
        ],
        "operationId": "getRacingRace",
        "summary": "One race card",
        "description": "One race's card (last-good, WebSocket-backed): its metadata plus every runner with the Fixed Win price and each-way terms. When racing is off: {\"enabled\": false}.",
        "responses": {
          "200": {
            "description": "The race card.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_time": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Server clock (UTC) when the response was built."
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Same as server_time; kept for backward compatibility."
                    },
                    "race": {
                      "$ref": "#/components/schemas/Race"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or non-numeric race id."
          },
          "404": {
            "description": "No cached race with that id."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {}
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "The bet365 race id (the race_id from /racing).",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/racing/results": {
      "get": {
        "tags": [
          "Odds"
        ],
        "operationId": "getRacingResults",
        "summary": "Resulted races",
        "description": "Resulted races (last-good): final placings with starting prices, the favourite tag and the exotic dividends (forecast/tricast and their winning combinations). Populated only when RACING_RESULTS is on; until then the list is empty (not an error). An empty read is never treated as 'no result'. When racing is off: {\"enabled\": false}.",
        "responses": {
          "200": {
            "description": "The resulted races.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "server_time": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Server clock (UTC) when the response was built."
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Same as server_time; kept for backward compatibility."
                    },
                    "code": {
                      "type": "string"
                    },
                    "date": {
                      "type": "string",
                      "description": "Normalised yyyymmdd echo of the validated filter (empty = all)."
                    },
                    "race_count": {
                      "type": "integer"
                    },
                    "races": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Race"
                      }
                    },
                    "enabled": {
                      "type": "boolean",
                      "description": "Present and false only when racing is off."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unknown code, or an invalid date (must be yyyymmdd or YYYY-MM-DD, a real calendar date)."
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          },
          {}
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "description": "Which racing code to return. all (or omitted) returns every code.",
            "schema": {
              "type": "string",
              "enum": [
                "horse",
                "harness",
                "greyhound",
                "all"
              ]
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Filter to one race date (yyyymmdd or YYYY-MM-DD, London). Omit for all cached results.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/ws": {
      "get": {
        "tags": [
          "WebSocket"
        ],
        "operationId": "websocket",
        "summary": "Live price updates (WebSocket)",
        "description": "Connect to wss://moviodds.com/ws, then send {\"op\":\"subscribe\"} (optionally with fixtures and groups lists, or leagues and sports to follow whole competitions). You get a snapshot per match, then delta messages when prices change, remove when selections or matches close, and lagged if you fall behind. subscribe replaces your whole subscription. The server pings every 30 seconds; close 1001 means we restarted, 1008 means the ping went unanswered or the socket wasn't read. See https://moviodds.com/bet365-odds-websocket/ .",
        "responses": {
          "101": {
            "description": "Switching protocols (WebSocket)"
          }
        }
      }
    },
    "/inplay": {
      "get": {
        "tags": [
          "Other endpoints"
        ],
        "operationId": "getInPlay",
        "summary": "Soccer matches in play now",
        "responses": {
          "200": {
            "description": "Ids of live soccer matches",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "fixtures": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Server busy; retry after the Retry-After seconds",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    },
    "/fixtures": {
      "get": {
        "tags": [
          "Other endpoints"
        ],
        "operationId": "getFixtures",
        "summary": "bet365's featured soccer matches with their main markets",
        "responses": {
          "200": {
            "description": "Featured matches",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "fixtures": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fi": {
                            "type": "string"
                          },
                          "home": {
                            "type": "string"
                          },
                          "away": {
                            "type": "string"
                          },
                          "league": {
                            "type": "string"
                          },
                          "kickoff_ts": {
                            "type": "integer",
                            "description": "Unix seconds"
                          },
                          "markets": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "outcomes": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string"
                                      },
                                      "odds_dec": {
                                        "type": "number"
                                      },
                                      "odds_frac": {
                                        "type": "string"
                                      },
                                      "sel_id": {
                                        "type": "string"
                                      },
                                      "suspended": {
                                        "type": "boolean"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Server busy; retry after the Retry-After seconds",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "502": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/markets": {
      "get": {
        "tags": [
          "Other endpoints"
        ],
        "operationId": "getMarkets",
        "summary": "One soccer match's main markets in a fixed shape",
        "description": "Full time result, half time result, double chance, draw no bet, total goals, first half total goals, team total goals and both teams to score. A match priced only in its league list has no coupon, so this answers 502 \"fetch failed: empty coupon body\"; /odds still has its prices.",
        "parameters": [
          {
            "name": "fi",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "bet365 fixture id (the id field from /odds)."
          }
        ],
        "responses": {
          "200": {
            "description": "The match's main markets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fi": {
                      "type": "string"
                    },
                    "home": {
                      "type": "string"
                    },
                    "away": {
                      "type": "string"
                    },
                    "league": {
                      "type": "string"
                    },
                    "kickoff_ts": {
                      "type": "integer",
                      "description": "Unix seconds"
                    },
                    "markets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "outcomes": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "odds_dec": {
                                  "type": "number"
                                },
                                "odds_frac": {
                                  "type": "string"
                                },
                                "sel_id": {
                                  "type": "string"
                                },
                                "suspended": {
                                  "type": "boolean"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "missing_markets": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Market types bet365 doesn't offer for this match."
                    },
                    "updated_ts": {
                      "type": "integer",
                      "description": "Unix seconds"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Server busy; retry after the Retry-After seconds",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "502": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/quotes": {
      "get": {
        "tags": [
          "Other endpoints"
        ],
        "operationId": "getQuotes",
        "summary": "Every selection priced on one match's coupon tabs",
        "description": "Same quote shape as /odds. Markets bet365 shows collapsed (scorers, cards, shots and more) are not included; /odds has them.",
        "parameters": [
          {
            "name": "fi",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "bet365 fixture id (the id field from /odds)."
          }
        ],
        "responses": {
          "200": {
            "description": "Quotes for the match",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fixture": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "groups": {
                      "type": "integer"
                    },
                    "dropped": {
                      "type": "integer"
                    },
                    "quotes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Quote"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Server busy; retry after the Retry-After seconds",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "502": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/coverage": {
      "get": {
        "tags": [
          "Other endpoints"
        ],
        "operationId": "getCoverage",
        "summary": "Market types /markets returns",
        "responses": {
          "200": {
            "description": "Market type lists",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "implemented": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "not_implemented": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "requested": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/stream": {
      "get": {
        "tags": [
          "Other endpoints"
        ],
        "operationId": "streamMatch",
        "summary": "Server-Sent Events feed for one soccer match",
        "description": "A snapshot event with the match and its main markets, then an odds event for each price change, until you disconnect. Add mode=inplay for a live match (ids from /inplay). The WebSocket covers every match and sport on one connection.",
        "parameters": [
          {
            "name": "fi",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "bet365 fixture id (the id field from /odds)."
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "inplay"
              ]
            },
            "description": "inplay for a live match; omit for pre-match."
          }
        ],
        "responses": {
          "200": {
            "description": "text/event-stream",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    },
    {}
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Optional, no key is needed right now. Also accepted as the `key` query parameter (WebSocket clients)."
      },
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "A Bet Builder key, or an account API key with the Bet Builder add-on. To get it, open a ticket on our Discord."
      }
    },
    "responses": {
      "Error": {
        "description": "Error.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "error"
              ]
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too many requests from this IP. Slow down, or use the WebSocket for live updates."
      }
    },
    "schemas": {
      "RaceMeeting": {
        "type": "object",
        "description": "One track's card for a day.",
        "properties": {
          "meeting_id": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "horse",
              "harness",
              "greyhound"
            ]
          },
          "class_id": {
            "type": "string",
            "description": "bet365 class: 2 or 73 (horse), 88 (harness), 4 (greyhound). 2 is thoroughbred, 73 North American."
          },
          "region": {
            "type": "string"
          },
          "course": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "description": "yyyymmdd (London)."
          }
        }
      },
      "Race": {
        "type": "object",
        "description": "One race on a meeting's card, with its runners priced for the Fixed Win market.",
        "properties": {
          "race_id": {
            "type": "string"
          },
          "meeting_id": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "horse",
              "harness",
              "greyhound"
            ]
          },
          "class_id": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "number": {
            "type": "integer",
            "description": "Race number (from the race title)."
          },
          "name": {
            "type": "string",
            "description": "Board race title, e.g. 'Race 1 Menangle'."
          },
          "full_name": {
            "type": "string",
            "description": "The real descriptive race name when bet365 provides it, e.g. 'Yirribee Pacing Stud Cattlewash Trotters Mobile' or '2yo Fillies Maiden Plate'. Detailed card only (RACING_CARD_HTTP); omitted until the card is drilled. The board 'name' is always present alongside it."
          },
          "start_type": {
            "type": "string",
            "enum": [
              "Mobile",
              "Standing"
            ],
            "description": "Harness start type (mobile/gate start vs standing start), parsed from the descriptive race name. Detailed card only; omitted when not a harness race or not stated."
          },
          "course": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "jump_utc": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled jump time (UTC). Drifts live."
          },
          "going": {
            "type": [
              "string",
              "null"
            ],
            "description": "Track going. null when unknown (greyhounds carry none). Key always present."
          },
          "distance": {
            "type": [
              "string",
              "null"
            ],
            "description": "Race distance ('6f', '480m', '1609m'). null when unknown. Key always present."
          },
          "class": {
            "type": [
              "string",
              "null"
            ],
            "description": "Race class/grade. null when unknown. Key always present."
          },
          "each_way": {
            "$ref": "#/components/schemas/RacingEachWay"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "suspended",
              "off",
              "running",
              "result_interim",
              "result_final",
              "abandoned"
            ],
            "description": "Lifecycle: open (pre-jump, priced) -> suspended (pre-jump, all runners temporarily suspended) -> off (jumped, win market closed) / running (jumped, fixed-odds in-running betting still moving) -> result_interim (placings in, dividends not yet declared) -> result_final (dividends declared / correct weight). abandoned = race abandoned or postponed. Derived from the jump clock, the WS card runner state and the result feed -- NOT from OVInPlay C2A presence (that index spans a wide pre/post-jump window and is not a reliable in-running signal)."
          },
          "in_play": {
            "type": "boolean",
            "description": "True while the race is physically off or running (jumped, not yet resulted)."
          },
          "last_status_change": {
            "type": "string",
            "format": "date-time",
            "description": "When the served status last changed."
          },
          "runners": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Runner"
            }
          },
          "exotics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExoticType"
            },
            "description": "Offered exotic/multi-leg/special bet types. Detailed card only (RACING_CARD_HTTP)."
          },
          "scratchings": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names scratched on the SP-card's separate Scratchings market (Brazil/Argentina). Fixed-odds cards flag a scratched runner inline on the runner instead. Detailed card only."
          },
          "result": {
            "$ref": "#/components/schemas/RaceResult"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Runner": {
        "type": "object",
        "description": "One horse or dog, priced for the Fixed Win market.",
        "properties": {
          "sel_id": {
            "type": "string",
            "description": "Stable selection id. Always present and non-empty: the bet365 selection id a price delta addresses, or for a scratched runner with no live selection the bet365 animal id, or a race_id+number composite ('202346824-7'). Clients can key every runner, scratched ones included."
          },
          "number": {
            "type": "integer",
            "description": "Saddlecloth number (horse) or box (greyhound). Runners are returned sorted by this number; unknown (0) sorts last."
          },
          "name": {
            "type": "string"
          },
          "jockey": {
            "type": [
              "string",
              "null"
            ],
            "description": "Jockey (driver for harness). null for greyhounds (no jockey) or an unknown driver. The key is always present."
          },
          "win_frac": {
            "type": "string",
            "description": "Fixed Win odds, fractional ('6/4'), exact. Absent when there is no fixed price."
          },
          "win_odds": {
            "type": [
              "number",
              "null"
            ],
            "description": "Fixed Win odds, decimal, rounded to 2 dp. null (not 0) when there is no fixed price (unpriced or suspended). The key is always present."
          },
          "scratched": {
            "type": "boolean",
            "description": "Always present. true when the runner was removed from the card."
          },
          "suspended": {
            "type": "boolean",
            "description": "Always present. true while betting on the runner is temporarily closed."
          },
          "silks": {
            "type": "string"
          },
          "barrier": {
            "type": "integer",
            "description": "Gate/barrier draw (AU thoroughbred). 0 for US thoroughbred, greyhound and harness, where the box/post is the number. Detailed card only (RACING_CARD_HTTP)."
          },
          "trainer": {
            "type": "string",
            "description": "Detailed card only."
          },
          "weight": {
            "type": "string",
            "description": "Carried weight verbatim ('59.5kg' AU, '120' US lbs). Detailed card only."
          },
          "age": {
            "type": "integer",
            "description": "Horse age. 0 for greyhounds. Detailed card only."
          },
          "colour_sex": {
            "type": "string",
            "description": "e.g. 'Bay - Gelding'. Detailed card only."
          },
          "career_stats": {
            "type": "string",
            "description": "Track/overall start-win-place counts. Detailed card only."
          },
          "form": {
            "type": "string",
            "description": "Recent-form string ('55x'). Detailed card only."
          },
          "place_frac": {
            "type": "string",
            "description": "Fixed Place odds, fractional, exact. Detailed card only."
          },
          "place_odds": {
            "type": [
              "number",
              "null"
            ],
            "description": "Fixed Place odds, decimal, rounded to 2 dp. Detailed card only; null/omitted when there is no place price."
          },
          "price_source": {
            "type": "string",
            "enum": [
              "pm",
              "ws",
              "card"
            ],
            "description": "Where the served win price came from: 'pm' = live per-runner full-field feed, 'ws' = board 3-runner preview, 'card' = HTTP racecoupon snapshot. Absent when the runner has no price."
          },
          "price_ts": {
            "type": "string",
            "format": "date-time",
            "description": "When the win price was last set from a fresh frame (its age). A 'card'-sourced price is a snapshot, not live."
          },
          "place_source": {
            "type": "string",
            "enum": [
              "pm",
              "card"
            ],
            "description": "Where the served place price came from: 'pm' = live feed, 'card' = HTTP snapshot."
          },
          "place_ts": {
            "type": "string",
            "format": "date-time",
            "description": "When the place price was last set from a fresh frame."
          },
          "favourite": {
            "type": "boolean",
            "description": "Runner(s) with the shortest active live win price (ties all flagged)."
          }
        }
      },
      "ExoticType": {
        "type": "object",
        "description": "One exotic / multi-leg / special bet offered on a race. These are tote/pari-mutuel markets, so there is no fixed price pre-race; the dividend is declared on the result.",
        "properties": {
          "code": {
            "type": "string",
            "description": "QUIN/EXAC/TRIF/FIFO (Quinella/Exacta/Trifecta/First Four), P3/P4/P5 (Pick N), DD (Daily Double), QDE (Quaddie), EXOTICS/TOPN/H2H/WIN123/NOFAV (market-menu groups)."
          },
          "name": {
            "type": "string"
          }
        }
      },
      "Placing": {
        "type": "object",
        "description": "One finishing position in a result. Two rows share a position on a dead heat.",
        "properties": {
          "position": {
            "type": "integer"
          },
          "number": {
            "type": "integer",
            "description": "The runner's saddlecloth/box."
          },
          "name": {
            "type": "string"
          },
          "sp_frac": {
            "type": "string",
            "description": "Starting price / primary tote return, verbatim. Fractional for UK/US/FR fixed-odds results ('14/1'); the first tote pool's return for AU/NZ/JP ('2.70' the 365 SP, '1.25' the win tote)."
          },
          "sp_odds": {
            "type": "number",
            "description": "sp_frac as a decimal."
          },
          "favourite": {
            "type": "boolean",
            "description": "The SP favourite: from the result's 'Fav' tag (UK/US) or derived from the shortest fixed win price (AU/NZ/JP tote results carry no tag)."
          },
          "silks": {
            "type": "string"
          }
        }
      },
      "Dividend": {
        "type": "object",
        "description": "One exotic / tote dividend declared on the result.",
        "properties": {
          "bet_type": {
            "type": "string",
            "description": "'Win', 'Place', 'Forecast'/'Exacta', 'Tricast'/'Trifecta', 'Quinella', 'First Four', 'Fixed Price Exacta', 'Quadrella', 'Pick N', 'Daily Double', ..."
          },
          "combination": {
            "type": "string",
            "description": "The winning numbers ('4', '4-2', '4-2-3', '5-6-7-8')."
          },
          "amount": {
            "type": "string",
            "description": "The declared dividend verbatim ('52.25')."
          }
        }
      },
      "RaceResult": {
        "type": "object",
        "description": "The terminal state of a race: placings, starting prices and exotic dividends. Populated only when RACING_RESULTS is on.",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "interim",
              "final"
            ],
            "description": "final once dividends are declared (correct weight); interim until then."
          },
          "conditions": {
            "type": "string"
          },
          "resulted_at": {
            "type": "string",
            "format": "date-time",
            "description": "bet365's result time: when the non-empty result was first observed (ISO-8601 UTC), stable across interim->final and restarts. NOT derived from the jump/off."
          },
          "off_time": {
            "type": "string",
            "format": "date-time",
            "description": "When the race went off (the EA header field parsed Europe/London -> UTC) — a few seconds after the scheduled jump, minutes before the result surfaces."
          },
          "placings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Placing"
            }
          },
          "dividends": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Dividend"
            }
          },
          "dead_heat": {
            "type": "boolean",
            "description": "Two or more runners share a finishing position."
          }
        }
      },
      "ClosingPricePoint": {
        "type": "object",
        "description": "One recorded price. odds_frac is a derived display fraction; odds_dec is authoritative.",
        "properties": {
          "ts": {
            "type": "string",
            "format": "date-time"
          },
          "fixture_id": {
            "type": "string",
            "description": "The id this price was recorded under. Present only when the response includes more than one id."
          },
          "group_id": {
            "type": "string",
            "description": "Selection identity (same fields as /odds). Present when non-empty."
          },
          "group_name": {
            "type": "string",
            "description": "The one stable English name for this group id across every match, even where bet365's feed names it differently or in another language on some matches. Absent only for a market bet365 never names anywhere."
          },
          "period": {
            "type": "string",
            "description": "The period part of a renamed period market's name: the game, set, goal, over or time window it is about. bet365 keeps one group_id for the whole family and renames it as the match goes on (\"Game 1 Player Totals\" then \"Game 2 Player Totals\"), so period tells the two apart: \"2\" there, \"40:00-49:59\" for \"Next 10 Minutes (40:00 - 49:59)\", \"1/2/1\" for \"Set 1 - Game 2 1st Point\", \"1-3\" for the score base in \"Asian Handicap (1-3)\". Several numbers are joined with \"/\" in name order. Only the numbers that say which period it is count; lines like 2.5, \"3-Way\" and team names do not. Absent when the name has no period."
          },
          "market_key": {
            "type": "string",
            "description": "group_id + \"|\" + period (e.g. \"2776|2\"), present only when period is. Settle on market_key + sel_id, falling back to group_id when market_key is absent: the same sel_id can carry on into the next period under the same group_id."
          },
          "market_id": {
            "type": "string"
          },
          "sel_id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "side": {
            "type": "string"
          },
          "line": {
            "type": "string"
          },
          "handicap": {
            "type": "string",
            "description": "The line/handicap for this selection. For an Over/Under total it carries the numeric line whether bet365 put it on the selection or in a positional label column. Present when non-empty."
          },
          "n2": {
            "type": "string",
            "description": "The team a selection belongs to: the player's team on player markets, and the team on markets split into one block per team (To Score In Half, Alternative Team Totals, Team TD Scorers), whose rows otherwise look the same for both teams. Present when non-empty."
          },
          "odds_dec": {
            "type": "number"
          },
          "odds_frac": {
            "type": "string"
          },
          "suspended": {
            "type": "boolean"
          }
        },
        "required": [
          "ts",
          "odds_dec",
          "suspended"
        ]
      },
      "PeriodScore": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Period/set name: '1st Half','2nd Half','Quarter 1','Period 1','Set 1', …"
          },
          "score": {
            "type": "string",
            "description": "The score for that period (home-away), or the set score (e.g. '7-6')."
          }
        }
      },
      "MatchResult": {
        "type": "object",
        "properties": {
          "fixture_id": {
            "type": "string",
            "description": "bet365 match id."
          },
          "sport": {
            "type": "string"
          },
          "home": {
            "type": "string"
          },
          "away": {
            "type": "string"
          },
          "league": {
            "type": "string"
          },
          "final_score": {
            "type": "string",
            "description": "The last scoreline seen (aggregate home-away; a comma-separated set list for set sports; for cricket bet365's Australian wickets/runs per innings in batting order, for example 7/199,8/141). For table tennis, badminton and volleyball the deciding set is included even though bet365 delists the match before adding it to its completed-set field. When the match stats are ahead of the live index at the end by one or two scoring plays (sport-specific: up to 2 goals in soccer and ice hockey, 6 points in basketball, 4 runs in baseball, 8 points in American football and rugby) and were updated within 3 minutes of the last live sighting (1 minute for e-soccer), that score is used and the note says so (bet365 delists a match seconds after its last score); stats further ahead, too late, or readable either way round make a finished result unknown. Darts: legs won; snooker: frames won; esports: maps won (a finished Counter-Strike or VALORANT result carries maps won, with each map's rounds in periods; otherwise their score is the rounds of the last map seen). Boxing and MMA: empty (bet365's live feed carries no fight result)."
          },
          "periods": {
            "type": "array",
            "description": "Per-period / per-set scores where the sport exposes them. A finished Counter-Strike or VALORANT result lists each map's rounds here (Map 1, Map 2, ...) while final_score is maps won. Empty for boxing and MMA.",
            "items": {
              "$ref": "#/components/schemas/PeriodScore"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "finished",
              "unknown"
            ],
            "description": "finished: the match reached full time (a player or side won the required sets, baseball reached the 9th inning, a cricket run result was derived, or in darts, snooker and esports a player or team won the legs, frames or maps its match format needs). unknown: it stopped before that, usually abandoned, suspended or postponed, or the sport has no finish model, or (tennis) a retirement or walkover, which bet365's live feed does not expose, so no winner is given. Boxing and MMA are unknown with an empty final_score (bet365's live feed carries no fight result; the note gives the last round seen). A tied basketball, baseball (except Korea after 11 innings, Japan/Taiwan after 12) or American football (except preseason) result is unknown, since the last score was most likely not seen; real ties (NFL/CFL after overtime, MLB exhibitions, two-leg basketball first legs) are unknown too. The last score is still returned."
          },
          "overtime": {
            "type": "boolean",
            "description": "Present and true when the match was decided beyond regulation: the final period seen was overtime or a shoot-out, or (for ice hockey) the final score is level so an overtime or shoot-out settled it. Omitted otherwise."
          },
          "note": {
            "type": "string",
            "description": "A short qualifier when the score alone is not enough, for example a tied ice-hockey final whose shoot-out or overtime winning goal is not part of bet365's score feed, or a cricket result by innings (bet365 lists innings in batting order, not home/away, so the winner is named by innings). Omitted otherwise."
          },
          "finished_at": {
            "type": "string",
            "format": "date-time",
            "description": "The last instant the match was seen live (≈ when it finished)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "stats": {
            "type": "object",
            "description": "Full-time match stats, only with stats=1 and only when the live stats feed tracked the match. Same shape as the live stats object (see doc section 10); baseball and American football (MLB, NFL) carry players with batting/pitching and passing/rushing/receiving/defense/kicking lines where bet365 shows them; a soccer result's standings are the league table as it stood at the final whistle. Baseball pitching lists only the side in the field when the match ended (bet365 shows one staff at a time); baseball player ids are role-side-name, football ids are bet365 player ids."
          }
        }
      },
      "Fixture": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "bet365 match id."
          },
          "home": {
            "type": "string"
          },
          "away": {
            "type": "string"
          },
          "league": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "kickoff_utc": {
            "type": "string",
            "format": "date-time",
            "description": "The match's scheduled kickoff (UTC). Omitted when unknown. For a live match listed without a start time this is an estimate of when it started, and kickoff_estimated is true."
          },
          "kickoff_estimated": {
            "type": "boolean",
            "description": "True when kickoff_utc is not bet365's scheduled start but an estimate derived from the live feed (the instant the match was first seen live), used only when the real start is unknown. Absent/false for a real scheduled kickoff."
          },
          "in_play": {
            "type": "boolean",
            "description": "True while the match is actually under way. A match bet365 lists on a court/table but has not started yet is not in play, and a finished match drops out of in play once bet365 stops streaming it live or the results tracker records it finished."
          },
          "score": {
            "type": "string",
            "description": "Live scoreline while in play, home-away. One pair for goal/point sports ('1-0'). For set sports it is the set list: tennis gives games ('6-4,2-3'); table tennis, volleyball and badminton give the completed games plus the current game's points ('11-7,6-11,12-14,11-9,2-6'). Omitted before kickoff and when bet365 sends none."
          },
          "last_seen": {
            "type": "string",
            "format": "date-time"
          },
          "sport": {
            "type": "string",
            "description": "Sport key, e.g. soccer, tennis, basketball."
          },
          "clock": {
            "$ref": "#/components/schemas/MatchClock",
            "description": "Live match clock on in-play matches that have one. Missing before kickoff."
          },
          "virtual": {
            "type": "boolean",
            "description": "true for esoccer and other virtual matches. Missing otherwise."
          },
          "inplay_nav_id": {
            "type": "string",
            "description": "bet365's id for the match's live page (the <n>C1 part of the in-play URL). Only on live matches."
          },
          "last_live_seen": {
            "type": "string",
            "format": "date-time",
            "description": "When the match was last seen in play."
          },
          "entry_tab": {
            "type": "string",
            "description": "Internal field we use to fetch the match. It can change or disappear without notice."
          },
          "discovery_source": {
            "type": "string",
            "description": "Internal field we use to fetch the match. It can change or disappear without notice."
          },
          "competition_id": {
            "type": "string",
            "description": "Internal field we use to fetch the match. It can change or disappear without notice."
          },
          "coupon_event_id": {
            "type": "string",
            "description": "Internal field we use to fetch the match. It can change or disappear without notice."
          }
        },
        "required": [
          "id",
          "home",
          "away",
          "in_play"
        ]
      },
      "Quote": {
        "type": "object",
        "description": "One price. Key a quote by (fixture_id, group_id, market_id, sel_id); to settle a renamed period market, use market_key in place of group_id when it is present.",
        "properties": {
          "fixture_id": {
            "type": "string"
          },
          "group_id": {
            "type": "string",
            "description": "Market id, stable across matches and languages (e.g. 40 = Full Time Result pre-match, 1777 in play)."
          },
          "group_name": {
            "type": "string",
            "description": "Market name as bet365 shows it."
          },
          "period": {
            "type": "string",
            "description": "The period part of a renamed period market's name: the game, set, goal, over or time window it is about. bet365 keeps one group_id for the whole family and renames it as the match goes on (\"Game 1 Player Totals\" then \"Game 2 Player Totals\"), so period tells the two apart: \"2\" there, \"40:00-49:59\" for \"Next 10 Minutes (40:00 - 49:59)\", \"1/2/1\" for \"Set 1 - Game 2 1st Point\", \"1-3\" for the score base in \"Asian Handicap (1-3)\". Several numbers are joined with \"/\" in name order. Only the numbers that say which period it is count; lines like 2.5, \"3-Way\" and team names do not. Absent when the name has no period."
          },
          "market_key": {
            "type": "string",
            "description": "group_id + \"|\" + period (e.g. \"2776|2\"), present only when period is. Settle on market_key + sel_id, falling back to group_id when market_key is absent: the same sel_id can carry on into the next period under the same group_id."
          },
          "market_id": {
            "type": "string"
          },
          "sel_id": {
            "type": "string",
            "description": "Selection id; also the leg id for Bet Builder."
          },
          "label": {
            "type": "string"
          },
          "n2": {
            "type": "string"
          },
          "handicap": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "description": "Column, e.g. Over/Under, Yes/No."
          },
          "line": {
            "type": "string",
            "description": "Line, handicap or row label. On table tennis, volleyball and badminton grids, Race to, Lead After and Odd/Even cells carry their target here (e.g. \"5\", \"10 Points\", \"Set 2\") with the player or team in side."
          },
          "odds_dec": {
            "type": "number"
          },
          "odds_frac": {
            "type": "string"
          },
          "suspended": {
            "type": "boolean"
          },
          "ts": {
            "type": "string",
            "format": "date-time",
            "description": "When this price last changed."
          },
          "phase": {
            "type": "string",
            "enum": [
              "prematch",
              "inplay"
            ],
            "description": "Which feed this price comes from: \"inplay\" for the live in-play market, \"prematch\" for a pre-match one. Only sent on matches that are in play, so on a live match you can tell the pre-match Full Time Result (group 40, usually suspended by then) from the live one (1777). Pre-match matches leave it out: no phase means pre-match."
          }
        },
        "required": [
          "fixture_id",
          "group_id",
          "sel_id",
          "odds_dec",
          "ts"
        ]
      },
      "Match": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Fixture"
          },
          {
            "type": "object",
            "properties": {
              "links": {
                "$ref": "#/components/schemas/MatchLinks",
                "description": "Ready-made bet365 deep links. Present only when the request sent links=1."
              },
              "quotes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Quote"
                }
              },
              "market_count": {
                "type": "integer",
                "description": "Markets priced for this match (unaffected by the groups filter)."
              },
              "polled_at": {
                "type": "string",
                "format": "date-time",
                "description": "When this match was last refreshed."
              }
            },
            "required": [
              "quotes",
              "market_count"
            ]
          }
        ]
      },
      "MatchLinks": {
        "type": "object",
        "description": "Ready-made bet365 deep links for a match, built from ids the API already carries. Opt in with links=1 on /odds. They are client-side SPA hash routes, so the same path works on every regional bet365 domain (the host is server-configured, default www.bet365.com). A field is present only when the ids needed to build it are; no bet-slip add-selection link is offered because bet365 exposes no stateless URL for that (it uses a logged-in Bet Share referral code instead).",
        "properties": {
          "match": {
            "type": "string",
            "description": "The link to open for the match in its CURRENT state: the live route when the match is in play, otherwise the pre-match coupon route.",
            "examples": [
              "https://www.bet365.com/#/AC/B1/C1/D8/E201200339/F3/"
            ]
          },
          "prematch": {
            "type": "string",
            "description": "The coupon-page route. Valid before kickoff; once the match goes in play bet365 purges the coupon node and this route bounces to the lobby (use live instead).",
            "examples": [
              "https://www.bet365.com/#/AC/B1/C1/D8/E201200339/F3/"
            ]
          },
          "live": {
            "type": "string",
            "description": "The in-play route. Present only for a match bet365 has indexed live.",
            "examples": [
              "https://www.bet365.com/#/IP/EV151382572392C1/"
            ]
          }
        }
      },
      "OddsResponse": {
        "type": "object",
        "properties": {
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "server_time": {
            "type": "string",
            "format": "date-time",
            "description": "Use server_time minus a quote's ts for its age."
          },
          "match_count": {
            "type": "integer",
            "description": "Matches in this response."
          },
          "catalog_matches": {
            "type": "integer",
            "description": "All catalogued matches, regardless of filters."
          },
          "cached_matches": {
            "type": "integer"
          },
          "quote_count": {
            "type": "integer"
          },
          "warming": {
            "type": "boolean",
            "description": "Present and true right after a restart; retry in about 30 seconds."
          },
          "note": {
            "type": "string"
          },
          "matches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Match"
            }
          }
        },
        "required": [
          "generated_at",
          "server_time",
          "match_count",
          "quote_count",
          "matches"
        ]
      },
      "SlipResult": {
        "type": "object",
        "properties": {
          "fixture": {
            "type": "string"
          },
          "home": {
            "type": "string"
          },
          "away": {
            "type": "string"
          },
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sel_id": {
                  "type": "string"
                },
                "market": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "odds_dec": {
                  "type": "number"
                }
              },
              "required": [
                "sel_id"
              ]
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "priced",
              "unavailable",
              "error"
            ],
            "description": "priced: odds set. unavailable: bet365 declined the combination. error: see error and retryable."
          },
          "odds_dec": {
            "type": "number"
          },
          "odds_frac": {
            "type": "string"
          },
          "naive_odds_dec": {
            "type": "number",
            "description": "The legs' single odds multiplied, for comparison."
          },
          "priced_at": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          }
        },
        "required": [
          "fixture",
          "legs",
          "status"
        ]
      },
      "OutrightEvent": {
        "type": "object",
        "description": "One outright event (a Grand Prix, tournament, race or season championship / league futures group) with its field markets.",
        "properties": {
          "event_id": {
            "type": "string",
            "description": "bet365 event id (the drilled body's EV FI)."
          },
          "event_name": {
            "type": "string",
            "description": "Event name, e.g. 'Bahrain Grand Prix', 'NFL 2026/27', 'AFL 2027', 'World Cup 2027'."
          },
          "sport": {
            "type": "string",
            "enum": [
              "formula1",
              "motorbikes",
              "nascar",
              "supercars",
              "motorsport",
              "golf",
              "cycling",
              "american_football",
              "basketball",
              "ice_hockey",
              "baseball",
              "rugby_union",
              "rugby_league",
              "australian_rules",
              "soccer"
            ]
          },
          "class_id": {
            "type": "string",
            "description": "bet365 class id (F1 10, golf 7, cycling 38, American football 12, baseball 16, ice hockey 17, basketball 18, rugby union 8, rugby league 19, Australian rules 36, soccer 1)."
          },
          "markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutrightMarket"
            }
          },
          "polled_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this event's prices were last refreshed."
          }
        },
        "required": [
          "event_id",
          "sport",
          "class_id",
          "markets"
        ]
      },
      "OutrightMarket": {
        "type": "object",
        "description": "One field market: a winner / top-N / championship question over the event's field, with each-way terms when offered. Distinct from /odds Quote (variable-size field, each_way).",
        "properties": {
          "event_id": {
            "type": "string"
          },
          "event_name": {
            "type": "string"
          },
          "group_id": {
            "type": "string",
            "description": "bet365 market-group id (stable across languages). NOT unique on its own: the eight NFL division winners share one group_id, and MLB serves two distinct World Series markets under one group_id. Key and dedupe markets on market_id, not group_id."
          },
          "market_id": {
            "type": "string",
            "description": "Stable, distinct per-market id (the field group's bet365 id). Use this to key or dedupe markets within an event; group_id can repeat across markets in the same event."
          },
          "market_name": {
            "type": "string",
            "description": "e.g. 'To Win Outright', 'Outrights', 'AFC East'. For same-named variants the column_name distinguishes them (e.g. 'Win Only' vs 'Win Only Live In-Play.')."
          },
          "column_name": {
            "type": "string",
            "description": "The named price column that supplied the field, e.g. 'Win Only', 'E/W 1/5 1-2-3'."
          },
          "field_truncated": {
            "type": "boolean",
            "description": "Present and true only when the served field is a partial top-N. bet365's featured outright widget first serves a market's 12 shortest-priced runners (a served-count cap ON alongside the 'more available' flag OM=1); for those markets the feed follows bet365's own 'Show more' request (matchmarketscontentapi/outrightspartial) and serves the complete field, clearing this flag. It stays true only when bet365 offers no 'Show more' for the market (e.g. the MLB World Series in the postseason) or when that follow-up request was empty this cycle (kept as last-good); then the field and its sub-100%-overround are a partial top 12, not the full field. Absent for a complete field, including markets (e.g. a 4-team NFL division) whose column repeats OM=1 but which carry no ON cap."
          },
          "runners_shown": {
            "type": "integer",
            "description": "On a truncated field, how many runners bet365 served (its ON count). Omitted when the field is complete."
          },
          "each_way": {
            "$ref": "#/components/schemas/EachWayTerms"
          },
          "selections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutrightSelection"
            }
          },
          "ts": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "event_id",
          "group_id",
          "market_id",
          "selections",
          "ts"
        ]
      },
      "OutrightSelection": {
        "type": "object",
        "description": "One runner in the field, priced for one market column.",
        "properties": {
          "sel_id": {
            "type": "string",
            "description": "bet365 selection id (the stable key; never the localized name)."
          },
          "name": {
            "type": "string",
            "description": "Runner/participant name (the team, for a grid market)."
          },
          "side": {
            "type": "string",
            "description": "For a team-row x price-column grid market (to make the playoffs, regular season wins) the price column this cell belongs to: 'Yes'/'No' or 'Over'/'Under'. Absent for an ordinary winner/field selection."
          },
          "line": {
            "type": "string",
            "description": "For a per-team over/under grid cell (regular season wins), the team's line, e.g. '9.5'. Absent for a yes/no grid or an ordinary field selection."
          },
          "odds_dec": {
            "type": "number",
            "description": "Decimal odds; 0 only when suspended with no price."
          },
          "odds_frac": {
            "type": "string",
            "description": "Fractional odds verbatim, e.g. '5/2'."
          },
          "suspended": {
            "type": "boolean"
          }
        },
        "required": [
          "sel_id",
          "name",
          "odds_dec"
        ]
      },
      "EachWayTerms": {
        "type": "object",
        "description": "Each-way place terms: back to win, a fraction of the odds pays for a place. Absent for a win-only market. 'E/W 1/5 1-2-3' => frac_num 1, frac_den 5, places 3.",
        "properties": {
          "places": {
            "type": "integer",
            "description": "Number of paying places, from the raw terms: 'E/W 1/2 1-2' and 'E/W 1/3 1-2' pay 2, '1-2-3' pays 3, '1-2-3-4' pays 4."
          },
          "frac_num": {
            "type": "integer",
            "description": "Place-fraction numerator (the 1 in 1/5)."
          },
          "frac_den": {
            "type": "integer",
            "description": "Place-fraction denominator (the 5 in 1/5)."
          },
          "raw": {
            "type": "string",
            "description": "Verbatim terms label."
          }
        }
      },
      "RacingEachWay": {
        "type": "object",
        "description": "Each-way place terms for a race. Same shape as EachWayTerms but every sub-field is nullable: a sub-field is null (not a sentinel 0 or '') when the board did not carry it. The each_way key itself is omitted when the race has no each-way terms at all. 'E/W 1/5 1-2-3' => frac_num 1, frac_den 5, places 3.",
        "properties": {
          "places": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of paying places; null when unknown."
          },
          "frac_num": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Place-fraction numerator (the 1 in 1/5); null when unknown."
          },
          "frac_den": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Place-fraction denominator (the 5 in 1/5); null when unknown."
          },
          "raw": {
            "type": [
              "string",
              "null"
            ],
            "description": "Verbatim terms label ('E/W 1/5 1-2-3'); null when it cannot be built."
          }
        }
      },
      "MatchClock": {
        "type": "object",
        "description": "Live match clock. min and sec are the played time at ref; while ticking is true you can advance it from ref. At half-time and other stops ticking is false and the time stays put.",
        "properties": {
          "min": {
            "type": "integer"
          },
          "sec": {
            "type": "integer"
          },
          "ticking": {
            "type": "boolean"
          },
          "ref": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "min",
          "sec",
          "ticking",
          "ref"
        ]
      }
    }
  }
}