# Overtime V2 markets (protected)

## REST API <a href="#rest-api" id="rest-api"></a>

<mark style="color:green;">`GET`</mark>  `https://api.overtime.io/overtime-v2/markets`

<mark style="color:green;">`GET`</mark>  `https://api.overtime.io/overtime-v2/markets/{{gameId}}`

See the markets API endpoint with request/response examples under [Postman documentation](https://documenter.getpostman.com/view/1435701/2sA3XY5Hao#74d322b9-bc86-483f-9c59-3eb9ea2cd11f).

All requests to this route must include a valid API key for authentication. The API key should be provided in the request header as `x-api-key`.

{% hint style="info" %}
Access to the Overtime API is restricted and requires an approved API key.\
\
API keys are issued only to teams or organizations that can clearly demonstrate how their intended use of the API delivers meaningful value to Overtime, its users, or its ecosystem. Requests must include a concrete description of the proposed use case, scope, and anticipated impact.\
\
**The Overtime API is not intended for experimental, hobbyist, or small personal projects. Requests that do not meet these criteria will not be approved.**
{% endhint %}

{% hint style="danger" %}
To prevent excessive use, API keys may be blacklisted, resulting in disabled access. The limits are as follows:

* Prematch: One request per league every 5 seconds.
* Live: One request for all leagues every 2 seconds.
  {% endhint %}

### Example Request

<https://api.overtime.io/overtime-v2/networks/10/markets?includeHashInResponse=true&responseHash=MRuJjZAhXzX3LWzZo%2B1q4ohxJpM%3D&onlyBasicProperties=true>

#### Single game request

<https://api.overtime.io/overtime-v2/networks/10/markets/0x3430343338353400000000000000000000000000000000000000000000000000>

### Request Parameters (as query string) <a href="#response-parameters" id="response-parameters"></a>

{% hint style="warning" %}
Use **`responseHash`** and **`includeHashInResponse`** when polling markets to avoid downloading the same data repeatedly. The API will return **`"no change"`** if the computed hash matches your `responseHash`, which significantly reduces payload size, bandwidth, and client/server processing.

Enable **`includeHashInResponse=true`** to get the server-computed `responseHash` in each response, so you can store it and send it back on the next request.
{% endhint %}

{% hint style="warning" %}
Use **`onlyBasicProperties=true`** to return a **reduced market object** with non-essential fields removed, which is recommended for UI “view mode” and frequent polling to **minimize payload size and speed up responses**.
{% endhint %}

<table><thead><tr><th width="223">Name</th><th width="195">Type</th><th>Description</th></tr></thead><tbody><tr><td>responseHash</td><td>string</td><td><p>Client-provided hash of the previous response. Server computes a SHA-1 hash of the would-be response and:</p><p></p><ul><li>returns <code>"no change"</code> if hashes match</li><li>otherwise returns the full payload</li></ul><p></p><p><strong>Notes:</strong> Used for lightweight polling / change detection.</p></td></tr><tr><td>includeHashInResponse</td><td>boolean</td><td><p> If <code>"true"</code>, response becomes:</p><pre class="language-json"><code class="lang-json"> "responseHash": "&#x3C;encoded>", "markets": ... }
</code></pre><p>and markets will be <code>"no change"</code> if it matches <code>responseHash</code>.</p></td></tr><tr><td>onlyBasicProperties</td><td>boolean</td><td>Strips markets down to a minimal set of fields to reduce payload size.</td></tr><tr><td>includeProofs</td><td>boolean</td><td><p>When used with <code>onlyBasicProperties=true</code>, includes proof-related fields (used for the validation of market data on the contract side) instead of stripping them.</p><p><br><strong>Notes:</strong> Proofs are used for the validation of market data on the contract side when placing a bet. Not required for read-only (view) mode.</p></td></tr><tr><td>onlyMainMarkets</td><td>boolean</td><td>For each parent market, returns only the “main” <strong>SPREAD</strong> and/or <strong>TOTAL</strong> child markets.</td></tr><tr><td>ungroup</td><td>boolean</td><td><p>Controls response shape:</p><ul><li><code>"false"</code> (default): markets response is grouped per sport</li><li><code>"true"</code>: response is an ungrouped flat array of markets</li></ul></td></tr><tr><td>minMaturity</td><td>number (timestamp-like numeric value)</td><td>Filters to markets with <code>market.maturity >= minMaturity</code>.</td></tr><tr><td>maxMaturity</td><td>number (timestamp-like numeric value)</td><td>Filters to markets with <code>market.maturity &#x3C;= maxmaturity</code>.</td></tr><tr><td>status</td><td>string</td><td><p>Selects which market-status bucket to return.<br></p><ul><li><strong>Default:</strong> <code>"open"</code></li><li><strong>Allowed:</strong> <code>open | resolved | cancelled | paused | ongoing</code></li></ul></td></tr><tr><td>sport</td><td>string</td><td>Filters markets by sport name.</td></tr><tr><td>leagueId</td><td>number</td><td>Filters markets to a single league ID.</td></tr><tr><td>typeId</td><td>number</td><td>Filters results to a single market type</td></tr><tr><td>leagueIds</td><td>string (comma-separated league IDs)</td><td>Filters markets to any of the specified leagues.</td></tr><tr><td>gameIds</td><td>string (comma-separated game IDs)</td><td>Filters markets to any of the specified game IDs.</td></tr><tr><td>typeIds</td><td>string (comma-separated type IDs)</td><td>Filters markets to any of the specified market type IDs.</td></tr><tr><td>playerIds</td><td>string (comma-separated player IDs)</td><td>Filters <strong>player prop</strong> markets to any of the specified player IDs.</td></tr><tr><td>lines</td><td>string (comma-separated market lines)</td><td>Filters markets by <code>market.line</code>.</td></tr><tr><td>includeFuturesInSport</td><td><code>any</code> (treated as “enabled if present”)</td><td>When <code>sport</code> is provided, also includes futures markets whose “initial sport” matches the requested sport.</td></tr></tbody></table>

### Example Response

{% tabs %}
{% tab title="200 OK" %}

```json
{
    "responseHash": "l%2FaLmDc4HsKYGxFy4uMJV5kfEoU%3D",
    "markets": {
        "gameId": "0x3430343338353400000000000000000000000000000000000000000000000000",
        "sport": "Soccer",
        "leagueId": 50,
        "leagueName": "UEFA EURO 2024",
        "subLeagueId": 50,
        "typeId": 0,
        "type": "winner",
        "line": 0,
        "maturity": 1719342000,
        "maturityDate": "2024-06-25T19:00:00.000Z",
        "homeTeam": "Denmark",
        "awayTeam": "Serbia",
        "status": 0,
        "isOpen": true,
        "isResolved": false,
        "isCancelled": false,
        "isPaused": false,
        "isOneSideMarket": false,
        "isPlayerPropsMarket": false,
        "isOneSidePlayerPropsMarket": false,
        "isYesNoPlayerPropsMarket": false,
        "playerProps": {
            "playerId": 0,
            "playerName": ""
        },
        "combinedPositions": [
            [],
            [],
            []
        ],
        "odds": [
            {
                "american": 118.0000000001308,
                "decimal": 2.180000000001308,
                "normalizedImplied": 0.45871559633
            },
            {
                "american": 220.9999999997721,
                "decimal": 3.209999999997721,
                "normalizedImplied": 0.311526479751
            },
            {
                "american": 250.00000000035004,
                "decimal": 3.5000000000035003,
                "normalizedImplied": 0.285714285714
            }
        ],
        "proof": [
            "0xf70b2ac4bc9dd2256176391dac75034bbbf8d0272dc70d46d3d3dc1ff4d3ee9e",
            "0xee9621418b4a6428d60b846c0dc3504b38e6dae3b29f92130d1ea688aae0fd42",
            "0x6e0aa14dae51f4f182ac39008f2e0c7b66c1a032376f5fb5289cbfadc7e348aa",
            "0x778f9ce7f8c283be56bb50276ac8c73eb40b5e333af41f59b45e86569d1dc54a"
        ],
        "childMarkets": [...],
        "statusCode": "open"
    }
}
```

{% endtab %}

{% tab title="200 OK  (no markets changes)" %}

```json
{
    "responseHash":"MRuJjZAhXzX3LWzZo%2B1q4ohxJpM%3D",
    "markets":"no change"
}
```

{% endtab %}
{% endtabs %}

### Response Parameters <a href="#response-parameters" id="response-parameters"></a>

<table><thead><tr><th width="266">Name</th><th width="195">Type</th><th>Description</th></tr></thead><tbody><tr><td>responseHash</td><td>string</td><td><p>The hash of the markets response. It can be used in subsequent requests to check if markets have changed.</p><ul><li>Returns <code>"no change"</code> if the markets haven’t changed.</li><li>Returns full market data if there are changes.</li></ul></td></tr><tr><td>gameId</td><td>string</td><td>Game ID</td></tr><tr><td>sport</td><td>string</td><td>Game sport. See <a href="/pages/VUIYQELsI0QLBiqX2zSX">Overtime V2 sports</a>.</td></tr><tr><td>leagueId</td><td>number</td><td>Game league ID. See <a href="/pages/VUIYQELsI0QLBiqX2zSX">Overtime V2 sports</a>.</td></tr><tr><td>leagueName</td><td>string</td><td>Game league name. See <a href="/pages/VUIYQELsI0QLBiqX2zSX">Overtime V2 sports</a>.</td></tr><tr><td>subLeagueId</td><td>number</td><td>Game subleague ID. It is used for some sports (tennis and UFC) to separate different levels and rounds of tournaments. (needed on the contract side, not used on UI).</td></tr><tr><td>typeId</td><td>number</td><td>Type ID of the market. 0 for parent market (moneyline/winner). For other types see <a href="/pages/7KFVAdCVy8Yuhc22tEuJ">Overtime V2 market types</a>.</td></tr><tr><td>type</td><td>string</td><td>Type of the market. See <a href="/pages/7KFVAdCVy8Yuhc22tEuJ">Overtime V2 market types</a>.</td></tr><tr><td>line</td><td>number</td><td>Market line (if available).</td></tr><tr><td>maturity</td><td>number</td><td>Game start timestamp</td></tr><tr><td>maturityDate</td><td>date</td><td>Game start date and time</td></tr><tr><td>homeTeam</td><td>string</td><td>The name of the home team</td></tr><tr><td>awayTeam</td><td>string</td><td>The name of the away team</td></tr><tr><td>status</td><td><a href="#statusenum">StatusEnum</a></td><td>The status of the market</td></tr><tr><td>isOpen</td><td>boolean</td><td>Is market open: <code>true</code> or <code>false</code>.</td></tr><tr><td>isResolved</td><td>boolean</td><td>Is market resolved: <code>true</code> or <code>false</code>.</td></tr><tr><td>isCancelled</td><td>boolean</td><td>Is market cancelled: <code>true</code> or <code>false</code>.</td></tr><tr><td>isPaused</td><td>boolean</td><td>Is market paused: <code>true</code> or <code>false</code>.</td></tr><tr><td>isOneSideMarket</td><td>boolean</td><td>Is one-side market (motosport, golf winner...): <code>true</code> or <code>false</code>.</td></tr><tr><td>isPlayerPropsMarket</td><td>boolean</td><td>Is player props market: <code>true</code> or <code>false</code>.</td></tr><tr><td>isOneSidePlayerPropsMarket</td><td>boolean</td><td>Is one-side player props market (who will score first/last touchdown...): <code>true</code> or <code>false</code>.</td></tr><tr><td>isYesNoPlayerPropsMarket</td><td>boolean</td><td>Is YES/NO player props market (double-double, triple-double...): <code>true</code> or <code>false</code>.</td></tr><tr><td>playerProps</td><td><a href="#playerprops">PlayerProps</a></td><td>Player info (if player props market)</td></tr><tr><td>combinedPositions</td><td><a href="#combinedposition">CombinedPosition</a>[][]</td><td>An array of combined positions if the market is that type (half-time/full-time, winner+total...)</td></tr><tr><td>odds</td><td><a href="#odds">Odds</a>[]</td><td>Market odds</td></tr><tr><td>proof</td><td>string[]</td><td>The Merkle proof used for the validation of market data on the contract side</td></tr><tr><td>childMarkets</td><td><a href="#response-parameters">Market</a>[]</td><td>Child markets with the same structure as parent market</td></tr><tr><td>statusCode</td><td><a href="#statuscodeenum">StatusCodeEnum</a></td><td>Market status code used for grouping markets per status.</td></tr></tbody></table>

#### StatusEnum

| Name      | Value |
| --------- | ----- |
| OPEN      | 0     |
| PAUSED    | 1     |
| RESOLVED  | 10    |
| CANCELLED | 255   |

#### StatusCodeEnum

| Name      | Value     |
| --------- | --------- |
| OPEN      | open      |
| PAUSED    | paused    |
| RESOLVED  | resolved  |
| CANCELLED | cancelled |
| ONGOING   | ongoing   |

#### PlayerProps

<table><thead><tr><th width="196">Name</th><th width="170">Type</th><th>Description</th></tr></thead><tbody><tr><td>playerId</td><td>number</td><td>Player ID</td></tr><tr><td>playerName</td><td>string</td><td>The name of the player</td></tr></tbody></table>

#### CombinedPosition

<table><thead><tr><th width="196">Name</th><th width="173">Type</th><th>Description</th></tr></thead><tbody><tr><td>typeId</td><td>number</td><td>The type ID of single market</td></tr><tr><td>position</td><td>number</td><td>The position on the single market</td></tr><tr><td>line</td><td>number</td><td>Single market line</td></tr></tbody></table>

#### Odds

<table><thead><tr><th width="196">Name</th><th width="173">Type</th><th>Description</th></tr></thead><tbody><tr><td>american</td><td>number</td><td>American format of the odds</td></tr><tr><td>decimal</td><td>number</td><td>Decimal format of the odds</td></tr><tr><td>normalizedImplied</td><td>number</td><td>Normalized Implied format of the odds</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.overtime.io/overtime-v2-integration/overtime-v2-markets-protected.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
