{
  "openapi": "3.1.0",
  "info": {
    "title": "OddsPush REST API",
    "version": "1.0.0",
    "summary": "Pinnacle odds, no-vig and fair prices, closing lines and drops over REST.",
    "description": "**OddsPush is paused.** The feed is offline and we are not taking new sign-ups or payments. This file documents the API as it works when it is running.\n\nThe REST side of OddsPush. For real-time updates use the WebSocket stream, `wss://feed.oddspush.com/v1/stream`, documented at https://oddspush.com/docs.\n\n**Authentication.** Your API token in the `x-token` header. `/v1/health` and `/v1/status` need none. A request from a new IP beyond your connections takes over from the oldest IP, like a stream login does.\n\n**Methods.** Only `GET`. Any other method or path answers 404 `{\"detail\": \"Not Found\"}`.\n\n**Errors** come as `{\"detail\": \"<code>\"}`.\n\n**Rate limits**, per account: up to 120 requests at once, then 300 a minute; with extra connections, that many times more. On the free plan: 20 at once and 60 a minute, per account and per IP. Past it: 429 `rate_limited` with `retry-after`.\n\n**Plans.** Each operation lists the plans it works on in `x-oddspush-plans` (`free`, `trial`, `paid`, or `public` for no token). REST-only and REST + stream plans are both `paid`.\n\n**Free plan.** Odds only, 30 seconds late. Every request needs `X-Accept-Delay: true` (or `?accept_delay=true`); without it, 403 `delayed_plan`. No `fair`, closing lines, CLV, history or drops (403 `not_in_plan`). With `accept_delay`, an expired token keeps working on the free plan.\n\n**Sports:** 1 Soccer, 2 Tennis, 3 Basketball, 4 Hockey, 5 American football, 6 Baseball, 7 Rugby, 8 MMA, 9 Boxing, 10 Other (volleyball and handball), 11 Esports, 12 Golf, 13 Cricket.\n\n**Channels:** `ld` and `both` are the prices to use; `dz` volatile moments; `pre` pre-match; `other` any other channel.",
    "termsOfService": "https://oddspush.com/terms",
    "contact": {
      "name": "OddsPush support",
      "url": "https://oddspush.com"
    }
  },
  "servers": [
    {
      "url": "https://feed.oddspush.com"
    }
  ],
  "security": [
    {
      "ApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Odds",
      "description": "Current odds and events."
    },
    {
      "name": "History and CLV",
      "description": "Line history, closing lines and CLV."
    },
    {
      "name": "Drops",
      "description": "Prices that shorten, measured on the fair price."
    },
    {
      "name": "Service",
      "description": "Health and status, no token needed."
    }
  ],
  "paths": {
    "/v1/events": {
      "get": {
        "operationId": "listEvents",
        "tags": [
          "Odds"
        ],
        "summary": "List the events with odds",
        "description": "Every event we hold, with the number of markets per channel, ordered by sport and event id. Events of the sports outside your plan are left out.",
        "x-oddspush-plans": [
          "free",
          "trial",
          "paid"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "sport_id",
            "in": "query",
            "required": false,
            "description": "Only this sport. 1 Soccer, 2 Tennis, 3 Basketball, 4 Hockey, 5 American football, 6 Baseball, 7 Rugby, 8 MMA, 9 Boxing, 10 Other (volleyball and handball), 11 Esports, 12 Golf, 13 Cricket.",
            "schema": {
              "type": "integer"
            },
            "example": 1
          },
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "description": "The channel counted in `markets`. Any value other than `ld`, `both`, `dz` or `pre` counts `other`.",
            "schema": {
              "type": "string",
              "default": "ld",
              "examples": [
                "ld",
                "both",
                "dz",
                "pre",
                "other"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/AcceptDelayQuery"
          },
          {
            "$ref": "#/components/parameters/AcceptDelayHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "The event index.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventIndex"
                },
                "example": {
                  "n": 2,
                  "events": [
                    {
                      "event_id": 1639824805,
                      "sport_id": 1,
                      "ld": 0,
                      "dz": 0,
                      "pre": 31,
                      "both": 0,
                      "other": 0,
                      "markets": 0
                    },
                    {
                      "event_id": 1640045537,
                      "sport_id": 1,
                      "ld": 18,
                      "dz": 4,
                      "pre": 0,
                      "both": 7,
                      "other": 0,
                      "markets": 18
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "`subscription_expired`: the plan expired (send `accept_delay` to use the free plan instead). `delayed_plan`: a free-plan token without `X-Accept-Delay: true` or `accept_delay=true`. `rest_not_in_plan`: the plan has no REST access. `ip_not_allowed`: only for accounts set up with a fixed IP by our support. `sport_not_in_plan`: a `sport_id` outside the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "subscription_expired": {
                    "value": {
                      "detail": "subscription_expired"
                    }
                  },
                  "delayed_plan": {
                    "value": {
                      "detail": "delayed_plan"
                    }
                  },
                  "rest_not_in_plan": {
                    "value": {
                      "detail": "rest_not_in_plan"
                    }
                  },
                  "ip_not_allowed": {
                    "value": {
                      "detail": "ip_not_allowed"
                    }
                  },
                  "sport_not_in_plan": {
                    "value": {
                      "detail": "sport_not_in_plan"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "`unavailable`: the service cannot answer this right now (on the free plan, also when the token could not be checked right now); wait `retry-after` seconds when the header is present. `not_ready`: free plan only, the delayed feed is still filling up after a restart of ours (at most 30 seconds).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "unavailable": {
                    "value": {
                      "detail": "unavailable"
                    }
                  },
                  "not_ready": {
                    "value": {
                      "detail": "not_ready"
                    }
                  }
                }
              }
            },
            "headers": {
              "retry-after": {
                "description": "Seconds to wait before trying again.",
                "required": false,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/{event_id}": {
      "get": {
        "operationId": "getEvent",
        "tags": [
          "Odds"
        ],
        "summary": "Get one event with its markets",
        "description": "The full event: `meta` (the event record without markets), `periods` (keyed by period number), its markets by `key` for each channel and `merged`. Without `channel`, every channel is returned and `merged` holds `ld` and `both` merged by `version`; with `channel`, only that channel, and `merged` holds its markets. For a special (`meta.type` is `special`), `merged` holds its current prices (not on the free plan). With `fair=true`, `fair` adds the no-vig and fair prices of every market in `merged`; for a pre-match event add `channel=pre`, or `fair` comes back empty.",
        "x-oddspush-plans": [
          "free",
          "trial",
          "paid"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/EventIdPath"
          },
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "description": "Only this channel. Any value other than `ld`, `both`, `dz` or `pre` is `other`.",
            "schema": {
              "type": "string",
              "examples": [
                "ld",
                "both",
                "dz",
                "pre",
                "other"
              ]
            }
          },
          {
            "name": "fair",
            "in": "query",
            "required": false,
            "description": "`true` or `1`: add `fair`. Trials and paid plans (`not_in_plan` on the free plan). Any value other than these and `false` or `0` is a `bad_request`.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "1",
                "false",
                "0"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/AcceptDelayQuery"
          },
          {
            "$ref": "#/components/parameters/AcceptDelayHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "The event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                },
                "example": {
                  "event_id": 1640045537,
                  "sport_id": 1,
                  "topic": "matchups/reg/sp/29/live/ld",
                  "meta": {
                    "id": 1640045537,
                    "parentId": 1639824805,
                    "type": "matchup",
                    "startTime": "2026-11-06T12:45:00Z",
                    "league": {
                      "id": 1980,
                      "name": "England - Premier League"
                    },
                    "participants": [
                      {
                        "alignment": "home",
                        "name": "Arsenal",
                        "state": {
                          "score": 0
                        }
                      },
                      {
                        "alignment": "away",
                        "name": "Chelsea",
                        "state": {
                          "score": 0
                        }
                      }
                    ],
                    "state": {
                      "state": 1,
                      "minutes": 27
                    }
                  },
                  "periods": {
                    "0": {
                      "period": 0,
                      "status": "open"
                    }
                  },
                  "ld": {
                    "s;0;m": {
                      "key": "s;0;m",
                      "version": 3772906584,
                      "status": "open",
                      "period": 0,
                      "type": "moneyline",
                      "isAlternate": false,
                      "prices": [
                        {
                          "designation": "home",
                          "price": -155
                        },
                        {
                          "designation": "away",
                          "price": 450
                        },
                        {
                          "designation": "draw",
                          "price": 300
                        }
                      ]
                    }
                  },
                  "dz": {},
                  "pre": {},
                  "both": {},
                  "other": {},
                  "merged": {
                    "s;0;m": {
                      "key": "s;0;m",
                      "version": 3772906584,
                      "status": "open",
                      "period": 0,
                      "type": "moneyline",
                      "isAlternate": false,
                      "prices": [
                        {
                          "designation": "home",
                          "price": -155
                        },
                        {
                          "designation": "away",
                          "price": 450
                        },
                        {
                          "designation": "draw",
                          "price": 300
                        }
                      ]
                    }
                  },
                  "fair": {
                    "s;0;m": {
                      "version": 3772906584,
                      "margin": 0.039661,
                      "prices": [
                        {
                          "designation": "home",
                          "price": -155,
                          "no_vig": 0.584655,
                          "fair": 0.595142,
                          "no_vig_decimal": 1.7104,
                          "fair_decimal": 1.6803
                        },
                        {
                          "designation": "away",
                          "price": 450,
                          "no_vig": 0.174882,
                          "fair": 0.169135,
                          "no_vig_decimal": 5.7181,
                          "fair_decimal": 5.9124
                        },
                        {
                          "designation": "draw",
                          "price": 300,
                          "no_vig": 0.240463,
                          "fair": 0.235723,
                          "no_vig_decimal": 4.1586,
                          "fair_decimal": 4.2423
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "`subscription_expired`: the plan expired (send `accept_delay` to use the free plan instead). `delayed_plan`: a free-plan token without `X-Accept-Delay: true` or `accept_delay=true`. `rest_not_in_plan`: the plan has no REST access. `ip_not_allowed`: only for accounts set up with a fixed IP by our support. `not_in_plan`: not included in the free plan (trials and paid plans only).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "subscription_expired": {
                    "value": {
                      "detail": "subscription_expired"
                    }
                  },
                  "delayed_plan": {
                    "value": {
                      "detail": "delayed_plan"
                    }
                  },
                  "rest_not_in_plan": {
                    "value": {
                      "detail": "rest_not_in_plan"
                    }
                  },
                  "ip_not_allowed": {
                    "value": {
                      "detail": "ip_not_allowed"
                    }
                  },
                  "not_in_plan": {
                    "value": {
                      "detail": "not_in_plan"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: no such event (or one of a sport outside your plan). `Not Found`: the event id is not a number.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "detail": "not_found"
                    }
                  },
                  "Not Found": {
                    "value": {
                      "detail": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "`unavailable`: the service cannot answer this right now (on the free plan, also when the token could not be checked right now); wait `retry-after` seconds when the header is present. `not_ready`: free plan only, the delayed feed is still filling up after a restart of ours (at most 30 seconds).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "unavailable": {
                    "value": {
                      "detail": "unavailable"
                    }
                  },
                  "not_ready": {
                    "value": {
                      "detail": "not_ready"
                    }
                  }
                }
              }
            },
            "headers": {
              "retry-after": {
                "description": "Seconds to wait before trying again.",
                "required": false,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/{event_id}/history": {
      "get": {
        "operationId": "getLineHistory",
        "tags": [
          "History and CLV"
        ],
        "summary": "Get the line history of an event",
        "description": "Every change of price, line (`points`) or status of the event's markets, as we received them, over the last 14 days, oldest first. Only changes are stored. At most 5,000 rows per response (1,000 with `fair=true`), always ending on a whole `time`: with `more: true`, ask again with `since` set to `next_since`. An unknown event, or one with no changes in the window, gives `n: 0`. The pre-match and the live version of a match are different events (`parentId`): ask for each.\n\nHistory requests have a limit of their own on top of the REST rate: 10 at once, then 30 a minute per account (times your connections).",
        "x-oddspush-plans": [
          "trial",
          "paid"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/EventIdPathI64"
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "description": "Only this market (`s;0;m`, `s;0;ou;2.5`...).",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "example": "s;0;m"
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only rows with `time` at or after this, in ms since epoch.",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 9223372036854775807,
              "default": 0
            },
            "example": 1793900000000
          },
          {
            "name": "fair",
            "in": "query",
            "required": false,
            "description": "`true` or `1`: add `fair` to every row.",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "1",
                "false",
                "0"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/AcceptDelayQuery"
          },
          {
            "$ref": "#/components/parameters/AcceptDelayHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "The history.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/History"
                },
                "example": {
                  "event_id": 1639824805,
                  "n": 2,
                  "more": false,
                  "next_since": null,
                  "history": [
                    {
                      "time": 1793969000000,
                      "channel": "pre",
                      "key": "s;0;m",
                      "status": "open",
                      "prices": [
                        {
                          "designation": "home",
                          "price": -117
                        },
                        {
                          "designation": "away",
                          "price": 269
                        },
                        {
                          "designation": "draw",
                          "price": 264
                        }
                      ]
                    },
                    {
                      "time": 1793969060000,
                      "channel": "pre",
                      "key": "s;0;m",
                      "status": "closed",
                      "prices": [
                        {
                          "designation": "home",
                          "price": -117
                        },
                        {
                          "designation": "away",
                          "price": 269
                        },
                        {
                          "designation": "draw",
                          "price": 264
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "`subscription_expired`: the plan expired (send `accept_delay` to use the free plan instead). `delayed_plan`: a free-plan token without `X-Accept-Delay: true` or `accept_delay=true`. `rest_not_in_plan`: the plan has no REST access. `ip_not_allowed`: only for accounts set up with a fixed IP by our support. `not_in_plan`: not included in the free plan (trials and paid plans only).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "subscription_expired": {
                    "value": {
                      "detail": "subscription_expired"
                    }
                  },
                  "delayed_plan": {
                    "value": {
                      "detail": "delayed_plan"
                    }
                  },
                  "rest_not_in_plan": {
                    "value": {
                      "detail": "rest_not_in_plan"
                    }
                  },
                  "ip_not_allowed": {
                    "value": {
                      "detail": "ip_not_allowed"
                    }
                  },
                  "not_in_plan": {
                    "value": {
                      "detail": "not_in_plan"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No such path, or a path parameter that is not a valid event id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "detail": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "`unavailable`: the service cannot answer this right now (on the free plan, also when the token could not be checked right now); wait `retry-after` seconds when the header is present. Also when the service is busy with other history requests (`retry-after: 1`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "unavailable": {
                    "value": {
                      "detail": "unavailable"
                    }
                  }
                }
              }
            },
            "headers": {
              "retry-after": {
                "description": "Seconds to wait before trying again.",
                "required": false,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          }
        }
      }
    },
    "/v1/membership": {
      "get": {
        "operationId": "getMembership",
        "tags": [
          "Odds"
        ],
        "summary": "Pre-match events about to go live",
        "description": "By sport: the pre-match events that are about to go live.",
        "x-oddspush-plans": [
          "free",
          "trial",
          "paid"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "sport_id",
            "in": "query",
            "required": false,
            "description": "Only this sport. 1 Soccer, 2 Tennis, 3 Basketball, 4 Hockey, 5 American football, 6 Baseball, 7 Rugby, 8 MMA, 9 Boxing, 10 Other (volleyball and handball), 11 Esports, 12 Golf, 13 Cricket.",
            "schema": {
              "type": "integer"
            },
            "example": 1
          },
          {
            "$ref": "#/components/parameters/AcceptDelayQuery"
          },
          {
            "$ref": "#/components/parameters/AcceptDelayHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "Keyed by sport id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Membership"
                },
                "example": {
                  "1": {
                    "n": 2,
                    "ids": [
                      1639824805,
                      1639824811
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "`subscription_expired`: the plan expired (send `accept_delay` to use the free plan instead). `delayed_plan`: a free-plan token without `X-Accept-Delay: true` or `accept_delay=true`. `rest_not_in_plan`: the plan has no REST access. `ip_not_allowed`: only for accounts set up with a fixed IP by our support. `sport_not_in_plan`: a `sport_id` outside the plan.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "subscription_expired": {
                    "value": {
                      "detail": "subscription_expired"
                    }
                  },
                  "delayed_plan": {
                    "value": {
                      "detail": "delayed_plan"
                    }
                  },
                  "rest_not_in_plan": {
                    "value": {
                      "detail": "rest_not_in_plan"
                    }
                  },
                  "ip_not_allowed": {
                    "value": {
                      "detail": "ip_not_allowed"
                    }
                  },
                  "sport_not_in_plan": {
                    "value": {
                      "detail": "sport_not_in_plan"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "`unavailable`: the service cannot answer this right now (on the free plan, also when the token could not be checked right now); wait `retry-after` seconds when the header is present. `not_ready`: free plan only, the delayed feed is still filling up after a restart of ours (at most 30 seconds).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "unavailable": {
                    "value": {
                      "detail": "unavailable"
                    }
                  },
                  "not_ready": {
                    "value": {
                      "detail": "not_ready"
                    }
                  }
                }
              }
            },
            "headers": {
              "retry-after": {
                "description": "Seconds to wait before trying again.",
                "required": false,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          }
        }
      }
    },
    "/v1/closing": {
      "get": {
        "operationId": "listClosings",
        "tags": [
          "History and CLV"
        ],
        "summary": "List the matches with a closing line",
        "description": "The matches that have kicked off and have a closing line, oldest first (by start time, then event id), at most 1,000 per response. With `more: true` the response carries `next_since` and `next_after`: ask again with `since=<next_since>&after=<next_after>`. Nothing is skipped or repeated, even when many matches share one start time (do not page with `since` just after the last `start_ms`: that skips the matches of that start time that did not fit). Closing lines are kept for 90 days after the start.",
        "x-oddspush-plans": [
          "trial",
          "paid"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "sport_id",
            "in": "query",
            "required": false,
            "description": "Only this sport. 1 Soccer, 2 Tennis, 3 Basketball, 4 Hockey, 5 American football, 6 Baseball, 7 Rugby, 8 MMA, 9 Boxing, 10 Other (volleyball and handball), 11 Esports, 12 Golf, 13 Cricket.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 1
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Start time in **milliseconds** since epoch to list from (inclusive). Default: the last 24 hours; anything older than 90 days (for example a time in seconds) is cut to 90 days ago.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 1793900000000
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "Only with `since`: the `next_after` of the previous page. Skips the matches that start at `since` up to this event id. Ignored without `since`, or when `since` is cut to 90 days ago.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 1638781055
          },
          {
            "$ref": "#/components/parameters/AcceptDelayQuery"
          },
          {
            "$ref": "#/components/parameters/AcceptDelayHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "The list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClosingList"
                },
                "example": {
                  "n": 1,
                  "more": false,
                  "events": [
                    {
                      "event_id": 1639824805,
                      "sport_id": 1,
                      "start_ms": 1793969100000
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "`subscription_expired`: the plan expired (send `accept_delay` to use the free plan instead). `delayed_plan`: a free-plan token without `X-Accept-Delay: true` or `accept_delay=true`. `rest_not_in_plan`: the plan has no REST access. `ip_not_allowed`: only for accounts set up with a fixed IP by our support. `sport_not_in_plan`: a `sport_id` outside the plan. `not_in_plan`: not included in the free plan (trials and paid plans only).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "subscription_expired": {
                    "value": {
                      "detail": "subscription_expired"
                    }
                  },
                  "delayed_plan": {
                    "value": {
                      "detail": "delayed_plan"
                    }
                  },
                  "rest_not_in_plan": {
                    "value": {
                      "detail": "rest_not_in_plan"
                    }
                  },
                  "ip_not_allowed": {
                    "value": {
                      "detail": "ip_not_allowed"
                    }
                  },
                  "sport_not_in_plan": {
                    "value": {
                      "detail": "sport_not_in_plan"
                    }
                  },
                  "not_in_plan": {
                    "value": {
                      "detail": "not_in_plan"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "`unavailable`: the service cannot answer this right now (on the free plan, also when the token could not be checked right now); wait `retry-after` seconds when the header is present.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "unavailable": {
                    "value": {
                      "detail": "unavailable"
                    }
                  }
                }
              }
            },
            "headers": {
              "retry-after": {
                "description": "Seconds to wait before trying again.",
                "required": false,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          }
        }
      }
    },
    "/v1/closing/{event_id}": {
      "get": {
        "operationId": "getClosing",
        "tags": [
          "History and CLV"
        ],
        "summary": "Get the closing line of a match",
        "description": "The closing line of a match (the last pre-match prices before it really starts), by its pre-match or its live event id. `not_found` until the match starts, and after 90 days.",
        "x-oddspush-plans": [
          "trial",
          "paid"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/EventIdPathI64"
          },
          {
            "$ref": "#/components/parameters/AcceptDelayQuery"
          },
          {
            "$ref": "#/components/parameters/AcceptDelayHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "The closing line.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Closing"
                },
                "example": {
                  "event_id": 1639824805,
                  "sport_id": 1,
                  "league": "England - Premier League",
                  "home": "Arsenal",
                  "away": "Chelsea",
                  "start_time": "2026-11-06T12:45:00Z",
                  "closed_ts": 1793969110000,
                  "reason": "live",
                  "live_event_id": 1640045537,
                  "markets": [
                    {
                      "key": "s;0;m",
                      "type": "moneyline",
                      "period": 0,
                      "isAlternate": false,
                      "version": 3772906584,
                      "margin": 0.084898,
                      "prices": [
                        {
                          "designation": "home",
                          "price": -117,
                          "no_vig": 0.496978,
                          "fair": 0.511498,
                          "no_vig_decimal": 2.0122,
                          "fair_decimal": 1.955
                        },
                        {
                          "designation": "away",
                          "price": 269,
                          "no_vig": 0.249796,
                          "fair": 0.242448,
                          "no_vig_decimal": 4.0033,
                          "fair_decimal": 4.1246
                        },
                        {
                          "designation": "draw",
                          "price": 264,
                          "no_vig": 0.253226,
                          "fair": 0.246054,
                          "no_vig_decimal": 3.949,
                          "fair_decimal": 4.0642
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "`subscription_expired`: the plan expired (send `accept_delay` to use the free plan instead). `delayed_plan`: a free-plan token without `X-Accept-Delay: true` or `accept_delay=true`. `rest_not_in_plan`: the plan has no REST access. `ip_not_allowed`: only for accounts set up with a fixed IP by our support. `not_in_plan`: not included in the free plan (trials and paid plans only).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "subscription_expired": {
                    "value": {
                      "detail": "subscription_expired"
                    }
                  },
                  "delayed_plan": {
                    "value": {
                      "detail": "delayed_plan"
                    }
                  },
                  "rest_not_in_plan": {
                    "value": {
                      "detail": "rest_not_in_plan"
                    }
                  },
                  "ip_not_allowed": {
                    "value": {
                      "detail": "ip_not_allowed"
                    }
                  },
                  "not_in_plan": {
                    "value": {
                      "detail": "not_in_plan"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: no closing line for that event (not started yet, older than 90 days, or a sport outside your plan). `Not Found`: the event id is not a valid number.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "detail": "not_found"
                    }
                  },
                  "Not Found": {
                    "value": {
                      "detail": "Not Found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "`unavailable`: the service cannot answer this right now (on the free plan, also when the token could not be checked right now); wait `retry-after` seconds when the header is present.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "unavailable": {
                    "value": {
                      "detail": "unavailable"
                    }
                  }
                }
              }
            },
            "headers": {
              "retry-after": {
                "description": "Seconds to wait before trying again.",
                "required": false,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          }
        }
      }
    },
    "/v1/clv": {
      "get": {
        "operationId": "getClv",
        "tags": [
          "History and CLV"
        ],
        "summary": "CLV of a bet against the closing line",
        "description": "Compares the odds you got on one leg with the closing line of that leg. `clv_pct` is `your decimal / fair_decimal - 1` in %, the number to track. Market keys are the same in the pre-match and the live event, so a live bet compares with the pre-match close.",
        "x-oddspush-plans": [
          "trial",
          "paid"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "event_id",
            "in": "query",
            "required": true,
            "description": "The pre-match or the live event id.",
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0,
              "maximum": 9223372036854775807
            },
            "example": 1639824805
          },
          {
            "name": "key",
            "in": "query",
            "required": true,
            "description": "The market key.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "example": "s;0;m"
          },
          {
            "name": "designation",
            "in": "query",
            "required": true,
            "description": "The leg: `home`, `away`, `draw`, `over`, `under`...",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "example": "home"
          },
          {
            "name": "price",
            "in": "query",
            "required": true,
            "description": "The odds you got: decimal (above 1 and below 100, like `2.10`) or American (with a sign, or 100 or more: `-110`, `150`). Write `+` as `%2B` in a URL, or leave it out.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 24
            },
            "example": "2.10"
          },
          {
            "$ref": "#/components/parameters/AcceptDelayQuery"
          },
          {
            "$ref": "#/components/parameters/AcceptDelayHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "The CLV of the bet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Clv"
                },
                "example": {
                  "event_id": 1639824805,
                  "live_event_id": 1640045537,
                  "sport_id": 1,
                  "start_time": "2026-11-06T12:45:00Z",
                  "key": "s;0;m",
                  "designation": "home",
                  "price": {
                    "american": 110,
                    "decimal": 2.1
                  },
                  "closing": {
                    "american": -117,
                    "decimal": 1.8547,
                    "no_vig_decimal": 2.0122,
                    "fair_decimal": 1.955
                  },
                  "clv_pct": 7.42,
                  "clv_raw_pct": 13.23,
                  "beat_close": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "`subscription_expired`: the plan expired (send `accept_delay` to use the free plan instead). `delayed_plan`: a free-plan token without `X-Accept-Delay: true` or `accept_delay=true`. `rest_not_in_plan`: the plan has no REST access. `ip_not_allowed`: only for accounts set up with a fixed IP by our support. `not_in_plan`: not included in the free plan (trials and paid plans only).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "subscription_expired": {
                    "value": {
                      "detail": "subscription_expired"
                    }
                  },
                  "delayed_plan": {
                    "value": {
                      "detail": "delayed_plan"
                    }
                  },
                  "rest_not_in_plan": {
                    "value": {
                      "detail": "rest_not_in_plan"
                    }
                  },
                  "ip_not_allowed": {
                    "value": {
                      "detail": "ip_not_allowed"
                    }
                  },
                  "not_in_plan": {
                    "value": {
                      "detail": "not_in_plan"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: no closing line for that event (or a sport outside your plan), or the closing line has no such market or leg.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "detail": "not_found"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "`unavailable`: the service cannot answer this right now (on the free plan, also when the token could not be checked right now); wait `retry-after` seconds when the header is present.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "unavailable": {
                    "value": {
                      "detail": "unavailable"
                    }
                  }
                }
              }
            },
            "headers": {
              "retry-after": {
                "description": "Seconds to wait before trying again.",
                "required": false,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          }
        }
      }
    },
    "/v1/drops": {
      "get": {
        "operationId": "listDrops",
        "tags": [
          "Drops"
        ],
        "summary": "Recent drops (shortening prices)",
        "description": "The drop alerts of the last hour that a stream with that `min_pct` and `window_s` would have sent, measured on the fair price (a change of margin alone is never a drop), in the order we measured them. At most 1,000 per response. To get the next page, or only what is new since your last call, ask again with `after` set to the `cursor` you got: nothing is skipped or repeated. Do not page by `time`. A `cursor` from before a restart of ours is ignored (you get the last hour again). Up to 60 alerts are kept per match, window and minute.",
        "x-oddspush-plans": [
          "trial",
          "paid"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "sport_id",
            "in": "query",
            "required": false,
            "description": "Only this sport. 1 Soccer, 2 Tennis, 3 Basketball, 4 Hockey, 5 American football, 6 Baseball, 7 Rugby, 8 MMA, 9 Boxing, 10 Other (volleyball and handball), 11 Esports, 12 Golf, 13 Cricket.",
            "schema": {
              "type": "integer"
            },
            "example": 1
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Only alerts with `time` at or after this (ms). Default: an hour ago.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 1793968000000
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "The `cursor` of your previous response.",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 1234567
          },
          {
            "name": "window_s",
            "in": "query",
            "required": false,
            "description": "The window, in seconds.",
            "schema": {
              "type": "integer",
              "enum": [
                30,
                60,
                300,
                600
              ],
              "default": 60
            }
          },
          {
            "name": "min_pct",
            "in": "query",
            "required": false,
            "description": "The minimum shortening of the fair price, in %.",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 50,
              "default": 3
            }
          },
          {
            "$ref": "#/components/parameters/AcceptDelayQuery"
          },
          {
            "$ref": "#/components/parameters/AcceptDelayHeader"
          }
        ],
        "responses": {
          "200": {
            "description": "The alerts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DropList"
                },
                "example": {
                  "n": 1,
                  "more": false,
                  "cursor": 1234568,
                  "alerts": [
                    {
                      "event_id": 1640045537,
                      "sport_id": 1,
                      "channel": "ld",
                      "league": "England - Premier League",
                      "home": "Arsenal",
                      "away": "Chelsea",
                      "start_time": "2026-11-06T12:45:00Z",
                      "live": true,
                      "state": {
                        "phase": 1,
                        "minute": 27,
                        "score": {
                          "home": 0,
                          "away": 0
                        },
                        "red_cards": {
                          "home": 0,
                          "away": 1
                        }
                      },
                      "market": {
                        "key": "s;0;m",
                        "type": "moneyline",
                        "period": 0,
                        "points": null
                      },
                      "designation": "home",
                      "from": {
                        "american": 120,
                        "decimal": 2.2,
                        "fair_decimal": 2.2812
                      },
                      "to": {
                        "american": -105,
                        "decimal": 1.9524,
                        "fair_decimal": 2.0235
                      },
                      "change_pct": 11.3,
                      "window_s": 60,
                      "time": 1793969110000
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "`subscription_expired`: the plan expired (send `accept_delay` to use the free plan instead). `delayed_plan`: a free-plan token without `X-Accept-Delay: true` or `accept_delay=true`. `rest_not_in_plan`: the plan has no REST access. `ip_not_allowed`: only for accounts set up with a fixed IP by our support. `sport_not_in_plan`: a `sport_id` outside the plan. `not_in_plan`: not included in the free plan (trials and paid plans only).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "subscription_expired": {
                    "value": {
                      "detail": "subscription_expired"
                    }
                  },
                  "delayed_plan": {
                    "value": {
                      "detail": "delayed_plan"
                    }
                  },
                  "rest_not_in_plan": {
                    "value": {
                      "detail": "rest_not_in_plan"
                    }
                  },
                  "ip_not_allowed": {
                    "value": {
                      "detail": "ip_not_allowed"
                    }
                  },
                  "sport_not_in_plan": {
                    "value": {
                      "detail": "sport_not_in_plan"
                    }
                  },
                  "not_in_plan": {
                    "value": {
                      "detail": "not_in_plan"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "`unavailable`: the service cannot answer this right now (on the free plan, also when the token could not be checked right now); wait `retry-after` seconds when the header is present.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "unavailable": {
                    "value": {
                      "detail": "unavailable"
                    }
                  }
                }
              }
            },
            "headers": {
              "retry-after": {
                "description": "Seconds to wait before trying again.",
                "required": false,
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          }
        }
      }
    },
    "/v1/health": {
      "get": {
        "operationId": "getHealth",
        "tags": [
          "Service"
        ],
        "summary": "Is the feed flowing",
        "description": "Public, no token needed.",
        "x-oddspush-plans": [
          "public"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "`ok` is true when the feed is flowing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                },
                "example": {
                  "ok": true
                }
              }
            }
          }
        }
      }
    },
    "/v1/status": {
      "get": {
        "operationId": "getStatus",
        "tags": [
          "Service"
        ],
        "summary": "Service status and measured latency",
        "description": "Public, no token needed. `ok`: the feed is flowing now. `latency_ms`: from the `ts` of the data to its arrival at a client we run every 5 minutes, connected like you through `wss://feed.oddspush.com/v1/stream` for 20 seconds. `our_ms`: the part of that which is ours, from the moment we read the update to its arrival. `measured_ms`: when that measurement ended. `latency_ms` and `our_ms` are `null` if there is no measurement from the last 15 minutes.",
        "x-oddspush-plans": [
          "public"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "The status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                },
                "example": {
                  "ok": true,
                  "latency_ms": {
                    "p50": 24.1,
                    "p90": 36.0
                  },
                  "our_ms": {
                    "p50": 1.2,
                    "p99": 3.4
                  },
                  "measured_ms": 1794000000000
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-token",
        "description": "Your API token (`opk_...`)."
      }
    },
    "parameters": {
      "AcceptDelayQuery": {
        "name": "accept_delay",
        "in": "query",
        "required": false,
        "description": "`true` or `1` (any case): accept odds 30 seconds late. Required with a free-plan token, and lets an expired token keep working on the free plan. Same as the `X-Accept-Delay` header.",
        "schema": {
          "type": "string"
        },
        "example": "true"
      },
      "AcceptDelayHeader": {
        "name": "X-Accept-Delay",
        "in": "header",
        "required": false,
        "description": "`true` or `1`: the same as `accept_delay=true`.",
        "schema": {
          "type": "string"
        },
        "example": "true"
      },
      "EventIdPath": {
        "name": "event_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64",
          "minimum": 0
        },
        "example": 1640045537
      },
      "EventIdPathI64": {
        "name": "event_id",
        "in": "path",
        "required": true,
        "description": "The pre-match or the live event id.",
        "schema": {
          "type": "integer",
          "format": "int64",
          "minimum": 0,
          "maximum": 9223372036854775807
        },
        "example": 1639824805
      }
    },
    "responses": {
      "BadRequest": {
        "description": "`bad_request`: a parameter that is not valid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "bad_request": {
                "value": {
                  "detail": "bad_request"
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "`unauthorized`: missing, unknown or revoked token.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "unauthorized": {
                "value": {
                  "detail": "unauthorized"
                }
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "`rate_limited`: over your REST rate. Wait the seconds in `retry-after`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "rate_limited": {
                "value": {
                  "detail": "rate_limited"
                }
              }
            }
          }
        },
        "headers": {
          "retry-after": {
            "description": "Seconds to wait before trying again.",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "detail"
        ],
        "properties": {
          "detail": {
            "type": "string",
            "description": "The error code.",
            "examples": [
              "unauthorized",
              "rate_limited",
              "not_found"
            ]
          }
        }
      },
      "PriceLeg": {
        "type": "object",
        "description": "One leg of a market. Specials have `participantId` (an entry of the event's `participants`) instead of `designation`.",
        "properties": {
          "designation": {
            "type": "string",
            "examples": [
              "home",
              "away",
              "draw",
              "over",
              "under"
            ]
          },
          "participantId": {
            "type": "integer",
            "format": "int64"
          },
          "price": {
            "type": "number",
            "description": "American odds."
          },
          "points": {
            "type": "number",
            "description": "The line, where the market has one."
          }
        },
        "additionalProperties": true
      },
      "Market": {
        "type": "object",
        "description": "A market as sent in the stream's `odds` messages. Fields not listed here may be present and are passed through as they come.",
        "properties": {
          "key": {
            "type": "string",
            "description": "Unique per event: `s;<period>;m` (moneyline), `s;<period>;s;<line>` (spread), `s;<period>;ou;<line>` (total), `s;<period>;tt;<line>;home|away` (team total). Period `0` is the full game.",
            "examples": [
              "s;0;m",
              "s;0;ou;2.5"
            ]
          },
          "version": {
            "type": "integer",
            "format": "int64",
            "description": "Order updates by this: the highest wins."
          },
          "status": {
            "type": "string",
            "description": "Anything other than `open` means closed. Specials have none."
          },
          "period": {
            "type": "integer"
          },
          "type": {
            "type": "string",
            "examples": [
              "moneyline",
              "spread",
              "total",
              "team_total"
            ]
          },
          "side": {
            "type": "string"
          },
          "isAlternate": {
            "type": "boolean",
            "description": "`false` for the main line."
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceLeg"
            }
          },
          "limits": {
            "description": "Maximum stake."
          }
        },
        "additionalProperties": true
      },
      "FairPrice": {
        "type": "object",
        "description": "A leg without the bookmaker's margin. `no_vig`: multiplicative method. `fair`: power method (better on lopsided and three-way markets).",
        "required": [
          "price",
          "no_vig",
          "fair",
          "no_vig_decimal",
          "fair_decimal"
        ],
        "properties": {
          "designation": {
            "type": "string"
          },
          "points": {
            "type": "number"
          },
          "price": {
            "type": "number",
            "description": "American odds, as in the market."
          },
          "no_vig": {
            "type": "number",
            "description": "Probability, multiplicative method (6 decimals)."
          },
          "fair": {
            "type": "number",
            "description": "Probability, power method (6 decimals)."
          },
          "no_vig_decimal": {
            "type": "number",
            "description": "`1 / no_vig` (4 decimals)."
          },
          "fair_decimal": {
            "type": "number",
            "description": "`1 / fair` (4 decimals)."
          }
        }
      },
      "Fair": {
        "type": "object",
        "required": [
          "margin",
          "prices"
        ],
        "properties": {
          "margin": {
            "type": "number",
            "description": "The bookmaker's margin: the sum of the implied probabilities minus 1."
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FairPrice"
            },
            "description": "One per leg, in the order of the market's `prices`."
          }
        }
      },
      "FairMarket": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Fair"
          },
          {
            "type": "object",
            "properties": {
              "version": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ]
      },
      "EventIndexRow": {
        "type": "object",
        "required": [
          "event_id",
          "sport_id",
          "ld",
          "dz",
          "pre",
          "both",
          "other",
          "markets"
        ],
        "properties": {
          "event_id": {
            "type": "integer",
            "format": "int64"
          },
          "sport_id": {
            "type": "integer"
          },
          "ld": {
            "type": "integer",
            "description": "Markets on `ld`."
          },
          "dz": {
            "type": "integer",
            "description": "Markets on `dz`."
          },
          "pre": {
            "type": "integer",
            "description": "Markets on `pre`."
          },
          "both": {
            "type": "integer",
            "description": "Markets on `both`."
          },
          "other": {
            "type": "integer",
            "description": "Markets on any other channel."
          },
          "markets": {
            "type": "integer",
            "description": "Markets on the `channel` asked for."
          }
        }
      },
      "EventIndex": {
        "type": "object",
        "required": [
          "n",
          "events"
        ],
        "properties": {
          "n": {
            "type": "integer"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventIndexRow"
            }
          }
        }
      },
      "MarketsByKey": {
        "type": "object",
        "description": "Markets by `key`.",
        "additionalProperties": {
          "$ref": "#/components/schemas/Market"
        }
      },
      "Event": {
        "type": "object",
        "required": [
          "event_id",
          "sport_id",
          "meta",
          "periods",
          "merged"
        ],
        "properties": {
          "event_id": {
            "type": "integer",
            "format": "int64"
          },
          "sport_id": {
            "type": "integer"
          },
          "topic": {
            "anyOf": [
              {
                "type": "string",
                "description": "The topic of the last update; its last segment is the channel."
              },
              {
                "type": "null"
              }
            ]
          },
          "meta": {
            "type": "object",
            "additionalProperties": true,
            "description": "The event record without markets, as in `odds`: `id`, `parentId`, `type`, `startTime`, `league`, `participants` (with `alignment` and `state.score`), `state`..."
          },
          "periods": {
            "type": "object",
            "description": "By period number.",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "ld": {
            "$ref": "#/components/schemas/MarketsByKey"
          },
          "both": {
            "$ref": "#/components/schemas/MarketsByKey"
          },
          "dz": {
            "$ref": "#/components/schemas/MarketsByKey"
          },
          "pre": {
            "$ref": "#/components/schemas/MarketsByKey"
          },
          "other": {
            "$ref": "#/components/schemas/MarketsByKey"
          },
          "merged": {
            "$ref": "#/components/schemas/MarketsByKey"
          },
          "fair": {
            "type": "object",
            "description": "Only with `fair=true`: by market `key`.",
            "additionalProperties": {
              "$ref": "#/components/schemas/FairMarket"
            }
          }
        }
      },
      "Membership": {
        "type": "object",
        "description": "By sport id.",
        "additionalProperties": {
          "type": "object",
          "required": [
            "n",
            "ids"
          ],
          "properties": {
            "n": {
              "type": "integer"
            },
            "ids": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        }
      },
      "ClosingMarket": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Fair"
          },
          {
            "type": "object",
            "required": [
              "key",
              "version"
            ],
            "properties": {
              "key": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "period": {
                "type": "integer"
              },
              "side": {
                "type": "string"
              },
              "isAlternate": {
                "type": "boolean"
              },
              "version": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        ]
      },
      "Closing": {
        "type": "object",
        "required": [
          "event_id",
          "sport_id",
          "start_time",
          "closed_ts",
          "reason",
          "live_event_id",
          "markets"
        ],
        "properties": {
          "event_id": {
            "type": "integer",
            "format": "int64",
            "description": "The pre-match event."
          },
          "sport_id": {
            "type": "integer"
          },
          "league": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "home": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "away": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "start_time": {
            "anyOf": [
              {
                "type": "string",
                "description": "Scheduled start."
              },
              {
                "type": "null"
              }
            ]
          },
          "closed_ts": {
            "type": "integer",
            "format": "int64",
            "description": "When the close was taken (ms, the feed's clock)."
          },
          "reason": {
            "type": "string",
            "enum": [
              "live",
              "started",
              "removed",
              "time"
            ],
            "description": "`live`: its live version started. `started`: the pre-match record turned `started`. `removed`: it was removed after its start. `time`: no live version (30 minutes or more after the start, with prices still for 10 minutes)."
          },
          "live_event_id": {
            "anyOf": [
              {
                "type": "integer",
                "format": "int64"
              },
              {
                "type": "null"
              }
            ]
          },
          "markets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClosingMarket"
            },
            "description": "Every open pre-match market at the close, by `key`."
          }
        }
      },
      "ClosingList": {
        "type": "object",
        "required": [
          "n",
          "more",
          "events"
        ],
        "properties": {
          "n": {
            "type": "integer"
          },
          "more": {
            "type": "boolean"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "event_id",
                "sport_id",
                "start_ms"
              ],
              "properties": {
                "event_id": {
                  "type": "integer",
                  "format": "int64"
                },
                "sport_id": {
                  "type": "integer"
                },
                "start_ms": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Start time, ms."
                }
              }
            }
          },
          "next_since": {
            "type": "integer",
            "format": "int64",
            "description": "Only with `more: true`: the `since` for the next page (the `start_ms` of the last match)."
          },
          "next_after": {
            "type": "integer",
            "format": "int64",
            "description": "Only with `more: true`: the `after` for the next page (the `event_id` of the last match)."
          }
        }
      },
      "Clv": {
        "type": "object",
        "required": [
          "event_id",
          "live_event_id",
          "sport_id",
          "start_time",
          "key",
          "designation",
          "price",
          "closing",
          "clv_pct",
          "clv_raw_pct",
          "beat_close"
        ],
        "properties": {
          "event_id": {
            "type": "integer",
            "format": "int64",
            "description": "The pre-match event."
          },
          "live_event_id": {
            "anyOf": [
              {
                "type": "integer",
                "format": "int64"
              },
              {
                "type": "null"
              }
            ]
          },
          "sport_id": {
            "type": "integer"
          },
          "start_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "key": {
            "type": "string"
          },
          "designation": {
            "type": "string"
          },
          "points": {
            "type": "number",
            "description": "For markets with a line."
          },
          "price": {
            "type": "object",
            "required": [
              "american",
              "decimal"
            ],
            "description": "Your odds, in both formats.",
            "properties": {
              "american": {
                "type": "integer"
              },
              "decimal": {
                "type": "number"
              }
            }
          },
          "closing": {
            "type": "object",
            "required": [
              "american",
              "decimal",
              "no_vig_decimal",
              "fair_decimal"
            ],
            "properties": {
              "american": {
                "type": "number"
              },
              "decimal": {
                "type": "number"
              },
              "no_vig_decimal": {
                "type": "number"
              },
              "fair_decimal": {
                "type": "number"
              }
            }
          },
          "clv_pct": {
            "type": "number",
            "description": "`your decimal / fair_decimal - 1`, in %."
          },
          "clv_raw_pct": {
            "type": "number",
            "description": "`your decimal / closing decimal - 1`, in %."
          },
          "beat_close": {
            "type": "boolean",
            "description": "`clv_pct > 0`."
          }
        }
      },
      "DropPrice": {
        "type": "object",
        "required": [
          "american",
          "decimal",
          "fair_decimal"
        ],
        "properties": {
          "american": {
            "type": "number"
          },
          "decimal": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "fair_decimal": {
            "type": "number"
          }
        }
      },
      "Drop": {
        "type": "object",
        "required": [
          "event_id",
          "sport_id",
          "channel",
          "market",
          "designation",
          "from",
          "to",
          "change_pct",
          "window_s",
          "time"
        ],
        "properties": {
          "event_id": {
            "type": "integer",
            "format": "int64"
          },
          "sport_id": {
            "type": "integer"
          },
          "channel": {
            "type": "string",
            "enum": [
              "ld",
              "both",
              "pre"
            ]
          },
          "league": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "home": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "away": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "start_time": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "live": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true,
                "description": "The match state when the price moved: `score`, `red_cards` and `sets` per side, and `minute`, `phase`, `quarter`, `clock`, `set`, `period` or `inning` as the sport has them."
              },
              {
                "type": "null"
              }
            ]
          },
          "market": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string"
              },
              "type": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "period": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "points": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "designation": {
            "type": "string"
          },
          "from": {
            "$ref": "#/components/schemas/DropPrice"
          },
          "to": {
            "$ref": "#/components/schemas/DropPrice"
          },
          "change_pct": {
            "type": "number",
            "description": "How much the fair decimal odds shortened, in %. Always positive."
          },
          "window_s": {
            "type": "integer",
            "enum": [
              30,
              60,
              300,
              600
            ]
          },
          "time": {
            "type": "integer",
            "format": "int64",
            "description": "When the new price was published (ms)."
          }
        }
      },
      "DropList": {
        "type": "object",
        "required": [
          "n",
          "more",
          "cursor",
          "alerts"
        ],
        "properties": {
          "n": {
            "type": "integer"
          },
          "more": {
            "type": "boolean"
          },
          "cursor": {
            "type": "integer",
            "format": "int64",
            "description": "Pass it as `after` next time."
          },
          "alerts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Drop"
            }
          }
        }
      },
      "HistoryRow": {
        "type": "object",
        "required": [
          "time",
          "channel",
          "key",
          "status",
          "prices"
        ],
        "properties": {
          "time": {
            "type": "integer",
            "format": "int64",
            "description": "The feed's timestamp of the update (ms)."
          },
          "channel": {
            "type": "string",
            "enum": [
              "ld",
              "both",
              "dz",
              "pre",
              "other"
            ]
          },
          "key": {
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceLeg"
            },
            "description": "Exactly as sent in `odds`."
          },
          "fair": {
            "description": "Only with `fair=true`; `null` if not open or no fair price.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/Fair"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "History": {
        "type": "object",
        "required": [
          "event_id",
          "n",
          "more",
          "next_since",
          "history"
        ],
        "properties": {
          "event_id": {
            "type": "integer",
            "format": "int64"
          },
          "n": {
            "type": "integer"
          },
          "more": {
            "type": "boolean"
          },
          "next_since": {
            "anyOf": [
              {
                "type": "integer",
                "format": "int64",
                "description": "With `more`, the next `since`."
              },
              {
                "type": "null"
              }
            ]
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HistoryRow"
            }
          }
        }
      },
      "Health": {
        "type": "object",
        "required": [
          "ok"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          }
        }
      },
      "Status": {
        "type": "object",
        "required": [
          "ok",
          "latency_ms",
          "our_ms",
          "measured_ms"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "p50",
                  "p90"
                ],
                "properties": {
                  "p50": {
                    "type": "number"
                  },
                  "p90": {
                    "type": "number"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "our_ms": {
            "anyOf": [
              {
                "type": "object",
                "required": [
                  "p50",
                  "p99"
                ],
                "properties": {
                  "p50": {
                    "type": "number"
                  },
                  "p99": {
                    "type": "number"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "measured_ms": {
            "anyOf": [
              {
                "type": "integer",
                "format": "int64"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      }
    }
  }
}
