{
  "openapi": "3.1.0",
  "info": {
    "title": "dino.markets odds API",
    "version": "2",
    "summary": "Odds from sportsbooks and prediction markets.",
    "description": "Read-only JSON API. Every route needs a key except this file. Credits: 1 per call to /v2/odds or /v2/events/{id}/odds that returns prices, however many games; lists and empty answers are free. A request whose cost is more than the key has left is refused with 429 quota_exceeded and nothing is taken. Once 80% of the credits are used, answers carry X-Quota-Limit, X-Quota-Remaining and X-Quota-Reset (the UTC date the credits renew, YYYY-MM-DD). A test key gets none of the three."
  },
  "servers": [
    {
      "url": "https://dino-odds-api.fly.dev"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "apiKeyHeader": []
    }
  ],
  "paths": {
    "/v2/odds": {
      "get": {
        "operationId": "listOdds",
        "summary": "Odds for a league, one game at a time",
        "description": "Games of one league (or the games named by event_ids) with their books, markets and prices. Costs 1 credit per call, however many games it returns (up to 100); an empty answer is free. A game with no market left after the filters is not listed, except a finished game (status=finished or all, or named in event_ids), which is listed with whatever books remain; one named in event_ids carries no books. A merged id in event_ids answers with the surviving game. Sorted by start_time, then id; status=finished is newest first. status picks scheduled, live, finished or all games; the default is scheduled and live, plus finished games named in event_ids. A finished-games call costs like any other call.",
        "parameters": [
          {
            "$ref": "#/components/parameters/League"
          },
          {
            "$ref": "#/components/parameters/EventIds"
          },
          {
            "$ref": "#/components/parameters/Markets"
          },
          {
            "$ref": "#/components/parameters/Period"
          },
          {
            "$ref": "#/components/parameters/Alternates"
          },
          {
            "$ref": "#/components/parameters/Books"
          },
          {
            "$ref": "#/components/parameters/Region"
          },
          {
            "$ref": "#/components/parameters/StartAfter"
          },
          {
            "$ref": "#/components/parameters/StartBefore"
          },
          {
            "$ref": "#/components/parameters/Status"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of games with prices.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "x-requests-last": {
                "$ref": "#/components/headers/RequestsLast"
              },
              "x-requests-used": {
                "$ref": "#/components/headers/RequestsUsed"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/RequestsRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OddsList"
                },
                "example": {
                  "as_of": "2026-11-24T14:03:54Z",
                  "events": [
                    {
                      "id": "66b5c29044efe2cee319ccab84c11afd",
                      "kind": "game",
                      "sport": "basketball",
                      "league": "nba",
                      "start_time": "2026-11-25T00:10:00Z",
                      "live": false,
                      "status": "scheduled",
                      "participants": [
                        {
                          "id": "p_tnc3yxj",
                          "name": "Orlando Magic",
                          "role": "home"
                        },
                        {
                          "id": "p_wtyhdvp",
                          "name": "Detroit Pistons",
                          "role": "away"
                        }
                      ],
                      "home": {
                        "id": "p_tnc3yxj",
                        "name": "Orlando Magic"
                      },
                      "away": {
                        "id": "p_wtyhdvp",
                        "name": "Detroit Pistons"
                      },
                      "score": null,
                      "books": [
                        {
                          "key": "draftkings",
                          "name": "DraftKings",
                          "markets": [
                            {
                              "key": "moneyline",
                              "period": "game",
                              "line": null,
                              "main": true,
                              "updated_at": "2026-11-24T12:57:10Z",
                              "outcomes": [
                                {
                                  "name": "Orlando Magic",
                                  "participant_id": "p_tnc3yxj",
                                  "side": "home",
                                  "price": "2.140",
                                  "american": "+114"
                                },
                                {
                                  "name": "Detroit Pistons",
                                  "participant_id": "p_wtyhdvp",
                                  "side": "away",
                                  "price": "1.741",
                                  "american": "-135"
                                }
                              ]
                            },
                            {
                              "key": "spread",
                              "period": "game",
                              "line": "2.5",
                              "main": true,
                              "updated_at": "2026-11-24T12:57:10Z",
                              "outcomes": [
                                {
                                  "name": "Orlando Magic",
                                  "participant_id": "p_tnc3yxj",
                                  "side": "home",
                                  "point": "2.5",
                                  "price": "1.901",
                                  "american": "-111"
                                },
                                {
                                  "name": "Detroit Pistons",
                                  "participant_id": "p_wtyhdvp",
                                  "side": "away",
                                  "point": "-2.5",
                                  "price": "1.917",
                                  "american": "-109"
                                }
                              ]
                            },
                            {
                              "key": "total",
                              "period": "game",
                              "line": "213.5",
                              "main": true,
                              "updated_at": "2026-11-24T12:57:10Z",
                              "outcomes": [
                                {
                                  "name": "Over",
                                  "participant_id": null,
                                  "side": "over",
                                  "point": "213.5",
                                  "price": "1.935",
                                  "american": "-107"
                                },
                                {
                                  "name": "Under",
                                  "participant_id": null,
                                  "side": "under",
                                  "point": "213.5",
                                  "price": "1.885",
                                  "american": "-113"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ],
                  "next_cursor": "MjAyNi0xMS0yNVQwMDoxMDowMFp8NjZiNWMyOTA0NGVmZTJjZWUzMTljY2FiODRjMTFhZmQ"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "405": {
            "description": "Only GET is supported.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "Allow": {
                "description": "GET",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "method": {
                    "value": {
                      "error": "method_not_allowed",
                      "message": "Only GET is supported.",
                      "request_id": "req_00b5a860898a76fa38e23bd8"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "Games of a league, without prices",
        "description": "The same games /v2/odds would list, with no books key. Free. status picks scheduled, live, finished or all games; the default is scheduled and live, plus finished games named in event_ids. markets is checked but does not narrow the list: a game is listed when any served market has a fresh price.",
        "parameters": [
          {
            "$ref": "#/components/parameters/League"
          },
          {
            "$ref": "#/components/parameters/EventIds"
          },
          {
            "$ref": "#/components/parameters/Markets"
          },
          {
            "$ref": "#/components/parameters/Books"
          },
          {
            "$ref": "#/components/parameters/Region"
          },
          {
            "$ref": "#/components/parameters/StartAfter"
          },
          {
            "$ref": "#/components/parameters/StartBefore"
          },
          {
            "$ref": "#/components/parameters/Status"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of games.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "x-requests-last": {
                "$ref": "#/components/headers/RequestsLast"
              },
              "x-requests-used": {
                "$ref": "#/components/headers/RequestsUsed"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/RequestsRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                },
                "example": {
                  "as_of": "2026-11-24T14:03:54Z",
                  "events": [
                    {
                      "id": "66b5c29044efe2cee319ccab84c11afd",
                      "kind": "game",
                      "sport": "basketball",
                      "league": "nba",
                      "start_time": "2026-11-25T00:10:00Z",
                      "live": false,
                      "status": "scheduled",
                      "participants": [
                        {
                          "id": "p_tnc3yxj",
                          "name": "Orlando Magic",
                          "role": "home"
                        },
                        {
                          "id": "p_wtyhdvp",
                          "name": "Detroit Pistons",
                          "role": "away"
                        }
                      ],
                      "home": {
                        "id": "p_tnc3yxj",
                        "name": "Orlando Magic"
                      },
                      "away": {
                        "id": "p_wtyhdvp",
                        "name": "Detroit Pistons"
                      },
                      "score": null
                    },
                    {
                      "id": "690c70077c6f7bff5be638bfd355137b",
                      "kind": "game",
                      "sport": "basketball",
                      "league": "nba",
                      "start_time": "2026-11-25T01:10:00Z",
                      "live": false,
                      "status": "scheduled",
                      "participants": [
                        {
                          "id": "p_tsip2yi",
                          "name": "Washington Wizards",
                          "role": "home"
                        },
                        {
                          "id": "p_64fagyf",
                          "name": "Boston Celtics",
                          "role": "away"
                        }
                      ],
                      "home": {
                        "id": "p_tsip2yi",
                        "name": "Washington Wizards"
                      },
                      "away": {
                        "id": "p_64fagyf",
                        "name": "Boston Celtics"
                      },
                      "score": null
                    }
                  ],
                  "next_cursor": "MjAyNi0xMS0yNVQwMToxMDowMFp8NjkwYzcwMDc3YzZmN2JmZjViZTYzOGJmZDM1NTEzN2I"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "405": {
            "description": "Only GET is supported.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "Allow": {
                "description": "GET",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "method": {
                    "value": {
                      "error": "method_not_allowed",
                      "message": "Only GET is supported.",
                      "request_id": "req_00b5a860898a76fa38e23bd8"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/events/{event_id}/odds": {
      "get": {
        "operationId": "getEventOdds",
        "summary": "Odds for one game",
        "description": "One game with its books, markets and prices. Costs 1 credit when the answer holds at least one book, else nothing. An id that was merged into another game answers with the surviving game, so the id in the answer can differ from the id asked for. A game that has finished is found by id for 72 hours after its start, with its score and no books once its prices are gone, and is free; after that the answer is 404.",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "description": "Event id, 32 characters.",
            "schema": {
              "type": "string",
              "minLength": 32,
              "maxLength": 32
            }
          },
          {
            "$ref": "#/components/parameters/Markets"
          },
          {
            "$ref": "#/components/parameters/Period"
          },
          {
            "$ref": "#/components/parameters/Alternates"
          },
          {
            "$ref": "#/components/parameters/Books"
          },
          {
            "$ref": "#/components/parameters/Region"
          }
        ],
        "responses": {
          "200": {
            "description": "The game with prices.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "x-requests-last": {
                "$ref": "#/components/headers/RequestsLast"
              },
              "x-requests-used": {
                "$ref": "#/components/headers/RequestsUsed"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/RequestsRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventOdds"
                },
                "example": {
                  "as_of": "2026-11-24T14:03:55Z",
                  "event": {
                    "id": "66b5c29044efe2cee319ccab84c11afd",
                    "kind": "game",
                    "sport": "basketball",
                    "league": "nba",
                    "start_time": "2026-11-25T00:10:00Z",
                    "live": false,
                    "status": "scheduled",
                    "participants": [
                      {
                        "id": "p_tnc3yxj",
                        "name": "Orlando Magic",
                        "role": "home"
                      },
                      {
                        "id": "p_wtyhdvp",
                        "name": "Detroit Pistons",
                        "role": "away"
                      }
                    ],
                    "home": {
                      "id": "p_tnc3yxj",
                      "name": "Orlando Magic"
                    },
                    "away": {
                      "id": "p_wtyhdvp",
                      "name": "Detroit Pistons"
                    },
                    "score": null,
                    "books": [
                      {
                        "key": "draftkings",
                        "name": "DraftKings",
                        "markets": [
                          {
                            "key": "moneyline",
                            "period": "game",
                            "line": null,
                            "main": true,
                            "updated_at": "2026-11-24T12:57:10Z",
                            "outcomes": [
                              {
                                "name": "Orlando Magic",
                                "participant_id": "p_tnc3yxj",
                                "side": "home",
                                "price": "2.140",
                                "american": "+114"
                              },
                              {
                                "name": "Detroit Pistons",
                                "participant_id": "p_wtyhdvp",
                                "side": "away",
                                "price": "1.741",
                                "american": "-135"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "405": {
            "description": "Only GET is supported.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "Allow": {
                "description": "GET",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "method": {
                    "value": {
                      "error": "method_not_allowed",
                      "message": "Only GET is supported.",
                      "request_id": "req_00b5a860898a76fa38e23bd8"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/leagues": {
      "get": {
        "operationId": "listLeagues",
        "summary": "Leagues you can ask for",
        "description": "Every value league accepts. Free. The example is trimmed to 3 of 40 leagues.",
        "responses": {
          "200": {
            "description": "All leagues.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "x-requests-last": {
                "$ref": "#/components/headers/RequestsLast"
              },
              "x-requests-used": {
                "$ref": "#/components/headers/RequestsUsed"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/RequestsRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeagueList"
                },
                "example": {
                  "leagues": [
                    {
                      "league": "nfl",
                      "sport": "americanfootball",
                      "name": "NFL",
                      "kind": "game",
                      "has_scores": true
                    },
                    {
                      "league": "ncaaf",
                      "sport": "americanfootball",
                      "name": "NCAAF",
                      "kind": "game",
                      "has_scores": true
                    },
                    {
                      "league": "nfl_super_bowl_winner",
                      "sport": "americanfootball",
                      "name": "NFL Super Bowl Winner",
                      "kind": "outright",
                      "has_scores": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "405": {
            "description": "Only GET is supported.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "Allow": {
                "description": "GET",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "method": {
                    "value": {
                      "error": "method_not_allowed",
                      "message": "Only GET is supported.",
                      "request_id": "req_00b5a860898a76fa38e23bd8"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/books": {
      "get": {
        "operationId": "listBooks",
        "summary": "Books you can ask for",
        "description": "Every value books accepts, with the regions that select it. Free. The example is trimmed to 3 of 47 books.",
        "responses": {
          "200": {
            "description": "All books.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "x-requests-last": {
                "$ref": "#/components/headers/RequestsLast"
              },
              "x-requests-used": {
                "$ref": "#/components/headers/RequestsUsed"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/RequestsRemaining"
              },
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookList"
                },
                "example": {
                  "books": [
                    {
                      "key": "atg_se",
                      "name": "ATG",
                      "regions": [
                        "se"
                      ]
                    },
                    {
                      "key": "ballybet",
                      "name": "Bally Bet",
                      "regions": [
                        "us"
                      ]
                    },
                    {
                      "key": "bet365_soccer",
                      "name": "bet365",
                      "regions": [
                        "us"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          },
          "405": {
            "description": "Only GET is supported.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "Allow": {
                "description": "GET",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "method": {
                    "value": {
                      "error": "method_not_allowed",
                      "message": "Only GET is supported.",
                      "request_id": "req_00b5a860898a76fa38e23bd8"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/openapi.json": {
      "get": {
        "operationId": "getOpenApi",
        "summary": "This file",
        "description": "The OpenAPI 3.1 description of /v2. Free, no key.",
        "security": [],
        "responses": {
          "200": {
            "description": "This document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "405": {
            "description": "Only GET is supported.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/XRequestId"
              },
              "Allow": {
                "description": "GET",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "method": {
                    "value": {
                      "error": "method_not_allowed",
                      "message": "Only GET is supported.",
                      "request_id": "req_00b5a860898a76fa38e23bd8"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer <key>"
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "The key in the x-api-key header. A key in the query string is not read."
      }
    },
    "headers": {
      "XRequestId": {
        "description": "Id of this request. Quote it when you write to us.",
        "schema": {
          "type": "string",
          "pattern": "^req_[0-9a-f]{24}$"
        }
      },
      "RequestsLast": {
        "description": "Credits this request cost.",
        "schema": {
          "type": "integer"
        }
      },
      "RequestsUsed": {
        "description": "Credits the key has used.",
        "schema": {
          "type": "integer"
        }
      },
      "RequestsRemaining": {
        "description": "Credits the key has left.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitLimit": {
        "description": "Sent only when the key has a rate limit.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemaining": {
        "description": "Requests left in the window. Sent only when the key has a rate limit.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitReset": {
        "description": "Epoch seconds when the window resets. Sent only when the key has a rate limit.",
        "schema": {
          "type": "integer"
        }
      }
    },
    "parameters": {
      "League": {
        "name": "league",
        "in": "query",
        "required": false,
        "description": "League slug from /v2/leagues. Required unless event_ids is given.",
        "schema": {
          "type": "string"
        },
        "example": "nba"
      },
      "EventIds": {
        "name": "event_ids",
        "in": "query",
        "required": false,
        "description": "Comma separated event ids, at most 100, each 32 characters. With no league, the ids are looked up in every league. An id that was merged into another game answers with the surviving game. A named game that has finished is returned without status too, for 72 hours after its start, with its score and no books; an answer of only such games is free.",
        "schema": {
          "type": "string"
        }
      },
      "Markets": {
        "name": "markets",
        "in": "query",
        "required": false,
        "description": "Comma separated market keys. Default: a game's moneyline, moneyline_3way, spread and total; an outright's outright. both_teams_to_score, draw_no_bet, double_chance, corners_total and corners_spread are soccer markets that come only when named here. The player_* keys are player markets: they come only when named here, one market per player and line, with the player in the player field. An unknown key: 400.",
        "style": "form",
        "explode": false,
        "schema": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "enum": [
              "moneyline",
              "moneyline_3way",
              "spread",
              "total",
              "outright",
              "both_teams_to_score",
              "draw_no_bet",
              "double_chance",
              "corners_total",
              "corners_spread",
              "player_points",
              "player_rebounds",
              "player_assists",
              "player_threes",
              "player_pass_yds",
              "player_rush_yds",
              "player_reception_yds",
              "player_receptions",
              "player_anytime_td",
              "player_goals",
              "player_shots_on_goal",
              "player_total_saves",
              "player_goal_scorer_anytime",
              "player_points_rebounds_assists"
            ]
          }
        }
      },
      "Period": {
        "name": "period",
        "in": "query",
        "required": false,
        "description": "Which part of the game the markets cover: game (the full game), h1 or h2 (halves), q1 to q4 (quarters), p1 to p3 (periods), or all for every part we hold. Default game. Each market says its own period. Not one of these values: 400.",
        "schema": {
          "type": "string",
          "enum": [
            "game",
            "h1",
            "h2",
            "q1",
            "q2",
            "q3",
            "q4",
            "p1",
            "p2",
            "p3",
            "all"
          ],
          "default": "game"
        }
      },
      "Alternates": {
        "name": "alternates",
        "in": "query",
        "required": false,
        "description": "true adds the non-main lines of spread, total, corner and player markets, each marked main false. Default false: main lines only. Not true or false: 400.",
        "schema": {
          "type": "string",
          "enum": [
            "true",
            "false"
          ],
          "default": "false"
        }
      },
      "Books": {
        "name": "books",
        "in": "query",
        "required": false,
        "description": "Comma separated book keys from /v2/books. Default: every book.",
        "style": "form",
        "explode": false,
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "Region": {
        "name": "region",
        "in": "query",
        "required": false,
        "description": "Keep only the books of one region. With books, both must match. A region with no book answers empty and free.",
        "schema": {
          "type": "string",
          "enum": [
            "us",
            "us2",
            "uk",
            "eu",
            "au",
            "ca",
            "us_dfs",
            "us_ex",
            "fr",
            "se",
            "fi"
          ]
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Games per page.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 25
        }
      },
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "required": false,
        "description": "The next_cursor of the previous answer, unchanged.",
        "schema": {
          "type": "string"
        }
      },
      "StartAfter": {
        "name": "start_after",
        "in": "query",
        "required": false,
        "description": "Only games that start at or after this time. RFC 3339, such as 2026-11-30T00:00:00Z; write a + offset as %2B. Applied before paging, so cursors stay correct inside the window. Not valid: 400.",
        "schema": {
          "type": "string",
          "format": "date-time"
        }
      },
      "StartBefore": {
        "name": "start_before",
        "in": "query",
        "required": false,
        "description": "Only games that start at or before this time. RFC 3339, as for start_after. Not valid: 400.",
        "schema": {
          "type": "string",
          "format": "date-time"
        }
      },
      "Status": {
        "name": "status",
        "in": "query",
        "required": false,
        "description": "Which games to list. Omitted: scheduled and live games, and with event_ids also the named games that have finished. scheduled: games not started. live: games in play. finished: games that have finished and started within the last 72 hours (3 days), newest first, with their final score; a finished game has no books once its prices are gone. all: scheduled, live and finished games together, oldest start first. Not one of these values: 400.",
        "schema": {
          "type": "string",
          "enum": [
            "scheduled",
            "live",
            "finished",
            "all"
          ]
        }
      }
    },
    "schemas": {
      "Participant": {
        "type": "object",
        "required": [
          "id",
          "name",
          "role"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "One id per team across leagues; null where not mapped yet."
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "description": "home or away."
          }
        }
      },
      "Outcome": {
        "type": "object",
        "required": [
          "name",
          "participant_id",
          "side",
          "price",
          "american"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The team, Over, Under, Draw, Yes or No (both_teams_to_score, player_anytime_td and player_goal_scorer_anytime), or on double_chance one of the pairs, such as Arsenal or Draw."
          },
          "participant_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null for over, under, draw, unmapped teams, and outright entries that are not a team or person with an id (golfers, drivers). Outright entries that are a team or person with an id carry it, the same id as in the game markets."
          },
          "side": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "home",
              "away",
              "draw",
              "over",
              "under",
              null
            ],
            "description": "Null on outright markets, on Yes and No, on double_chance, and where the name matches no participant."
          },
          "point": {
            "type": "string",
            "description": "Present on spread, total, corner and player outcomes that have a line: the line for this outcome, signed."
          },
          "price": {
            "type": "string",
            "pattern": "^[0-9]+\\.[0-9]{3}$",
            "description": "Decimal price, 3 places."
          },
          "american": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[+-][0-9]+$",
            "description": "American price made from the rounded decimal. Null when the price is 1.000 or less."
          }
        }
      },
      "Market": {
        "type": "object",
        "required": [
          "key",
          "period",
          "line",
          "main",
          "updated_at",
          "outcomes"
        ],
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "moneyline",
              "moneyline_3way",
              "spread",
              "total",
              "outright",
              "both_teams_to_score",
              "draw_no_bet",
              "double_chance",
              "corners_total",
              "corners_spread",
              "player_points",
              "player_rebounds",
              "player_assists",
              "player_threes",
              "player_pass_yds",
              "player_rush_yds",
              "player_reception_yds",
              "player_receptions",
              "player_anytime_td",
              "player_goals",
              "player_shots_on_goal",
              "player_total_saves",
              "player_goal_scorer_anytime",
              "player_points_rebounds_assists"
            ]
          },
          "period": {
            "type": "string",
            "enum": [
              "game",
              "h1",
              "h2",
              "q1",
              "q2",
              "q3",
              "q4",
              "p1",
              "p2",
              "p3"
            ],
            "description": "The part of the game this market covers. game unless period was asked for."
          },
          "line": {
            "type": [
              "string",
              "null"
            ],
            "description": "The line of a spread, total, corners_spread, corners_total or player market (the home side's handicap for a spread); null on a moneyline, an outright, both_teams_to_score, draw_no_bet, double_chance, player_anytime_td and player_goal_scorer_anytime."
          },
          "main": {
            "type": "boolean",
            "description": "True on the main line. False only on the extra lines that alternates=true adds."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When we first saw the current prices."
          },
          "player": {
            "type": "object",
            "description": "Present only on a player market: who it is on. Absent on every other market.",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Always null for now."
              },
              "name": {
                "type": "string",
                "description": "The player's full name, the same across books."
              }
            }
          },
          "outcomes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Outcome"
            }
          }
        }
      },
      "Book": {
        "type": "object",
        "required": [
          "key",
          "name",
          "markets"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Market"
            }
          }
        }
      },
      "Event": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "sport",
          "league",
          "start_time",
          "status",
          "participants"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 32,
            "maxLength": 32
          },
          "kind": {
            "type": "string",
            "enum": [
              "game",
              "outright"
            ]
          },
          "sport": {
            "type": "string"
          },
          "league": {
            "type": "string"
          },
          "start_time": {
            "type": "string",
            "format": "date-time"
          },
          "live": {
            "type": "boolean",
            "description": "True once a game has started and is not finished: its prices are in-play prices. Always false for an outright and for a finished game."
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "live",
              "finished"
            ],
            "description": "For a game: scheduled until the start time, live after it, and finished once the game is over, which is known only for leagues with scores. An outright is scheduled while it is open for betting and finished once settled (known only for leagues with scores); it is never live, as its live field is always false. Finished games are listed only with status=finished or status=all."
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Participant"
            },
            "description": "Empty for an outright."
          },
          "home": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Side"
              },
              {
                "type": "null"
              }
            ],
            "description": "The participant with role home: its id and name. Null for an outright, and for any event whose participants have no home side."
          },
          "away": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Side"
              },
              {
                "type": "null"
              }
            ],
            "description": "The participant with role away: its id and name. Null for an outright, and for any event whose participants have no away side."
          },
          "books": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Book"
            },
            "description": "Absent on /v2/events. Empty on a finished game whose prices are gone."
          },
          "score": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Score"
              },
              {
                "type": "null"
              }
            ],
            "description": "The score, as strings. Null when no score is known, when the game has not started, when the league has no score source (see has_scores on /v2/leagues), and always for an outright."
          }
        }
      },
      "OddsList": {
        "type": "object",
        "required": [
          "as_of",
          "events",
          "next_cursor"
        ],
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null on the last page."
          }
        }
      },
      "EventList": {
        "type": "object",
        "required": [
          "as_of",
          "events",
          "next_cursor"
        ],
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null on the last page."
          }
        }
      },
      "EventOdds": {
        "type": "object",
        "required": [
          "as_of",
          "event"
        ],
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "event": {
            "$ref": "#/components/schemas/Event"
          }
        }
      },
      "LeagueList": {
        "type": "object",
        "required": [
          "leagues"
        ],
        "properties": {
          "leagues": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "league",
                "sport",
                "name",
                "kind",
                "has_scores"
              ],
              "properties": {
                "league": {
                  "type": "string"
                },
                "sport": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "game",
                    "outright"
                  ]
                },
                "has_scores": {
                  "type": "boolean",
                  "description": "True when games of this league carry a score once started. False: score is always null."
                }
              }
            }
          }
        }
      },
      "BookList": {
        "type": "object",
        "required": [
          "books"
        ],
        "properties": {
          "books": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "key",
                "name",
                "regions"
              ],
              "properties": {
                "key": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "regions": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "us",
                      "us2",
                      "uk",
                      "eu",
                      "au",
                      "ca",
                      "us_dfs",
                      "us_ex",
                      "fr",
                      "se",
                      "fi"
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message",
          "request_id"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "invalid_request",
              "unauthorized",
              "not_found",
              "method_not_allowed",
              "quota_exceeded",
              "rate_limited",
              "internal_error",
              "unavailable"
            ]
          },
          "message": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "Side": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The same id as the participant of that role; null where not mapped yet."
          },
          "name": {
            "type": "string"
          }
        }
      },
      "Score": {
        "type": "object",
        "required": [
          "home",
          "away"
        ],
        "description": "A game's score as the source gives it: points or goals; sets won in tennis; 1 for the winner and 0 for the loser of a fight.",
        "properties": {
          "home": {
            "type": "string",
            "description": "The home side's score."
          },
          "away": {
            "type": "string",
            "description": "The away side's score."
          }
        }
      }
    },
    "responses": {
      "InvalidRequest": {
        "description": "A parameter is not valid. The message names it and lists the valid values.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "limit": {
                "value": {
                  "error": "invalid_request",
                  "message": "limit must be an integer from 1 to 100; the default is 25.",
                  "request_id": "req_00b5a860898a76fa38e23bd8"
                }
              },
              "markets": {
                "value": {
                  "error": "invalid_request",
                  "message": "Unknown markets value \"foo\". Valid markets: moneyline, moneyline_3way, spread, total, outright.",
                  "request_id": "req_00b5a860898a76fa38e23bd8"
                }
              },
              "cursor": {
                "value": {
                  "error": "invalid_request",
                  "message": "cursor is not valid. Use the next_cursor of the previous answer, unchanged.",
                  "request_id": "req_00b5a860898a76fa38e23bd8"
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "The key is missing, invalid or deactivated.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "missing": {
                "value": {
                  "error": "unauthorized",
                  "message": "API key is missing. Send it as Authorization: Bearer <key> or in the x-api-key header; the apiKey query parameter is not accepted on /v2.",
                  "request_id": "req_00b5a860898a76fa38e23bd8"
                }
              },
              "invalid": {
                "value": {
                  "error": "unauthorized",
                  "message": "API key is invalid or not tied to a subscription.",
                  "request_id": "req_00b5a860898a76fa38e23bd8"
                }
              },
              "deactivated": {
                "value": {
                  "error": "unauthorized",
                  "message": "API key has been deactivated.",
                  "request_id": "req_00b5a860898a76fa38e23bd8"
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "No game has this id, or no route matches.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "event": {
                "value": {
                  "error": "not_found",
                  "message": "Event not found. It may have concluded; get current ids from /v2/events.",
                  "request_id": "req_00b5a860898a76fa38e23bd8"
                }
              }
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "The key is out of credits (quota_exceeded) or sent too many requests (rate_limited). A rate_limited answer carries Retry-After.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "Retry-After": {
            "description": "Seconds to wait. Sent with rate_limited.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "quota": {
                "value": {
                  "error": "quota_exceeded",
                  "message": "Usage quota has been reached. Upgrade the plan or wait for the quota to reset.",
                  "request_id": "req_00b5a860898a76fa38e23bd8"
                }
              },
              "rate": {
                "value": {
                  "error": "rate_limited",
                  "message": "Rate limited. Space requests out over several seconds and try again.",
                  "request_id": "req_00b5a860898a76fa38e23bd8"
                }
              }
            }
          }
        }
      },
      "InternalError": {
        "description": "Something went wrong on our side. Nothing is charged.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "internal": {
                "value": {
                  "error": "internal_error",
                  "message": "Something went wrong on our side. Try again in a moment.",
                  "request_id": "req_00b5a860898a76fa38e23bd8"
                }
              }
            }
          }
        }
      },
      "Unavailable": {
        "description": "The service is starting up (Retry-After is 10), accounts are unavailable (5), or too many large requests are being answered at once (2): a /v2/odds call with alternates=true, a period other than game, or a player market is built three at a time, and a fourth gets this answer at no cost.",
        "headers": {
          "X-Request-Id": {
            "$ref": "#/components/headers/XRequestId"
          },
          "Retry-After": {
            "description": "Seconds to wait.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "starting": {
                "value": {
                  "error": "unavailable",
                  "message": "The service is starting up. Try again in a few seconds.",
                  "request_id": "req_00b5a860898a76fa38e23bd8"
                }
              },
              "busy": {
                "value": {
                  "error": "unavailable",
                  "message": "Too many large requests are being answered right now. Try again in a few seconds, or ask for less: fewer markets, no alternates, one period.",
                  "request_id": "req_00b5a860898a76fa38e23bd8"
                }
              }
            }
          }
        }
      }
    }
  }
}
