---
title: "Closing lines of a day's events"
method: GET
path: "/v2/historical/closing"
tags: ["Historical"]
---

# Closing lines of a day's events

`GET /v2/historical/closing`

## Request

- Base URL: `https://api.oddsrelay.io`
- URL: `https://api.oddsrelay.io/v2/historical/closing`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

For every event that started on the UTC day `date` in `sports` — matched against the event's held `sport_key` (the key or its start), as on the snapshot route, and never against `competition_key` or a sport name (`football` selects nothing, `soccer` all of soccer) — (bookmakers and exchanges — `bookmakersOnly=true`: bookmakers alone; BETDAQ never): each bookmaker's each outcome's line on the event's kick-off day (UTC) up to kick-off — when it was first seen that day and its price then (`open_at`, `open_price`: 00:00 if it was already listed; `first_seen` is the same instant), its last state before kick-off (`close_at`, `close_price`), its `high` and `low` and how many times it moved (`moves`) over that day up to kick-off, when it was `last_seen`, and whether it was still on the board after kick-off (`inplay_seen`); `ord` numbers outcomes of one name in one market. Each event names itself as the snapshot does (its held `sport_key`/`sport_title`, a race's `venue` — the proven course on days before the archive recorded one — or a teamless event's `event_name`). Nested as the raw board nests (event > bookmakers > markets > outcomes); paged by event (sport, kick-off, id), at most 50 events a page. A day's closing lines are cut the night after it (the release lag).

**Checks, in this order** (the live feed's own): the per-address shield, the key, the flood cap, a suspended account, a browser key's website, the API version; `region` (uk or one international code; outside the regions your key reads 403 `region_not_in_scope`), `historical` in the key; the parameters (each one this route reads, once) and their values; the instant(s); the venues (400 unknown, 403 outside your plan, 403 `exchange_history_unavailable` for any exchange while exchange history is switched off; `bookmakersOnly=true` beside an exchange filter is 400); your account's scope (403 with `valid`; a sport, market or venue left out is the scope's list); `quote=true`; the price (402).

**Price**: /v2/pricing `regions.uk.historical.closing` (an international `region`: its own `regions.<code>.historical.closing`) tokens a page with events; a page with none, a 304 and `quote=true` are free. Free closing: at the owner's setting /v2/pricing `regions.uk.historical.free_closing_days` (N), closing lines from the last N complete UTC days before the archive's newest day cost 0 on this route — off today (N is 0); the closing files keep their price.

## Query parameters

- `date` string, date, required
- `sports` string, required
- `region` 'uk' | 'za' | 'ng' | 'us' | 'tz' | 'ke' | 'gh' | 'au' | 'ca' | 'zm' | 'ug' | 'cm' | 'ci' | 'sn' | 'cd' | 'mz' | 'mw' | 'nz' | 'rw' | 'global' | 'gr' | 'cz'
- `bookmakers` string
- `exchanges` string
- `markets` string
- `exchangesOnly` 'true' | 'false'
- `bookmakersOnly` 'true' | 'false'
- `limit` integer
- `cursor` string
- `quote` string

## Response `200`

One page, or under `quote=true` the price.

- union
  - ClosingEnvelope
    - `meta` object, required
      - `feed_type` 'historical_closing'
      - `region` string
      - `date` string
      - `count` integer
      - `version` string
      - `next_cursor` string, nullable
      - `historical` boolean
    - `data` ClosingEvent[], required
      - `id` string, required
      - `sport_key` string, nullable
      - `sport_title` string, nullable
      - `commence_time` string, nullable
      - `home_team` string, nullable
      - `away_team` string, nullable
      - `venue` string: Racing (horse and greyhound): the course, e.g. `Cheltenham`, `Doomben (AUS)`. Present only on a race. The same string on every route that serves this id (`/v2/odds/raw`, `/v2/odds/event/{id}`, the matched boards, `/v2/events`, `/v2/historical`), kept under the id while any bookmaker still lists the race under that spelling. One string per course (since 2026-11-14): its country tag in one spelling — `(AUS)`, `(US)`, `(NZL)`, `(HK)`, `(JPN)`… — an overseas course tagged even when no bookmaker tags it (`Fukushima (JPN)`, `Woodbine (CAN)`), a UK or Irish course plain; a greyhound meeting's words dropped (`Hove`, not `Hove Bags`). An ante-post market carries its festival's course (`Cheltenham`), or none, and its category as `event_name`.
      - `event_name` string: An event with no two teams that is not a race (a golf tournament, an outright, a special): its name, e.g. `Austin Championship 2026`. Present only on such an event; the same string on every route that serves this id. A race (horse or greyhound) carries `venue` instead; the matched boards alone keep a greyhound race's served `event_name` (`21:04 Central Park`).
      - `bookmakers` object[], required
        - `key` string
        - `markets` object[]
          - `key` string
          - `outcomes` ClosingOutcome[]
            - `name` string, nullable, required
            - `ord` integer: 0, 1, … numbering outcomes of one name in one market.
            - `open_at` string, nullable: When the outcome was first seen on its kick-off day (UTC; 00:00 if it was already listed); `open_price` is its price then.
            - `open_price` union
              - …
            - `open_back_price` union
              - …
            - `open_lay_price` union
              - …
            - `open_available` union
              - …
            - `close_at` string, nullable: When its last state before kick-off was taken (null: none before it).
            - `close_price` union
              - …
            - `close_back_price` union
              - …
            - `close_lay_price` union
              - …
            - `close_available` union
              - …
            - `high` union: The highest price on its kick-off day (UTC) up to kick-off.
              - …
            - `low` union: The lowest price on its kick-off day (UTC) up to kick-off.
              - …
            - `moves` integer, nullable: How many times the price moved on its kick-off day (UTC) up to kick-off.
            - `first_seen` string, nullable: The same instant as `open_at`: when the outcome was first seen on its kick-off day (UTC).
            - `last_seen` string, nullable: When it was last on the board.
            - `inplay_seen` boolean, nullable: true: still on the board after kick-off.
  - Quote: `quote=true`: this request's price. Free.
    - `cost` integer, required
    - `remaining` union, required: Tokens left, `unlimited`, or null when unknown.
      - integer
      - string
    - `rate_card` string, required

## Other responses

- `304`: Not modified: no body, free.
- `400`: 400: a parameter this route does not read or sent twice, a malformed value, gzip refused on standard, dutching or raw, or a filter value the catalogue does not know.
- `401`: 401: no key, or a key that is not accepted. Carries `WWW-Authenticate`; no token or flood-cap headers.
- `402`: 402 `insufficient_tokens`: the price is above the balance. Price it first with `quote=true`.
- `403`: 403: the account, the key's scope, the region, the plan or the account's scope refuses this call.
- `404`: 404.
- `429`: 429 with `Retry-After`. `too_many_requests`: the account's flood cap or its in-flight cap (with `X-RateLimit-*`). `too_many_from_address`: the per-address shield, before authentication (no token or flood-cap headers). The front door's own per-address cap also answers 429 with `Retry-After`, but with an EMPTY body and no `code`. Both per-address caps sit well above an account's flood cap.
- `500`: 500 `internal_error`. If it came after a spend, `X-Tokens-Cost` reads 0 and the spend stands.
- `503`: 503 with `Retry-After`: `temporarily_unavailable` (a board, the key registry or a connection is not ready; retry) or `raw_not_enabled` (the key may use raw but the raw board is not held here).

## Changes

- **2026-12-03** `c9a116d43241`: 1 info
  - added the new enum value `cz` to the `query` request parameter `region`
- **2026-11-18** `e28e311eeb1e`: 20 info
  - added the new enum value `au` to the `query` request parameter `region`
  - added the new enum value `ca` to the `query` request parameter `region`
  - added the new enum value `cd` to the `query` request parameter `region`
  - added the new enum value `ci` to the `query` request parameter `region`
  - …16 more
- **2026-11-13** `391dae9911bf`: 2 info
  - added the optional property `oneOf[#/components/schemas/ClosingEnvelope]/data/items/event_name` to the response with the `200` status
  - added the optional property `oneOf[#/components/schemas/ClosingEnvelope]/data/items/venue` to the response with the `200` status
- **2026-11-02** `d74a579e00e5`: 1 info
  - added the new optional `query` request parameter `bookmakersOnly`
- **2026-10-26** `9db71e3e29bb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/oddsrelay/apis/oddsrelay-api/changes/v2/historical/closing/get.md)

---

[API](https://skmtc.dev/oddsrelay/apis/oddsrelay-api.md) - [All operations](https://skmtc.dev/oddsrelay/apis/oddsrelay-api/llms.txt) - [OpenAPI document](https://skmtc.dev/oddsrelay/apis/oddsrelay-api/revisions/c9a116d43241?raw)
