# Overtime V2 quote data

{% hint style="info" %} <mark style="color:blue;">**Users placing trades with THALES will get 1% extra payouts for each game they have on their ticket.**</mark>
{% endhint %}

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

<mark style="color:orange;">`POST`</mark> `https://api.overtime.io/overtime-v2/networks/{{network}}/quote`

See quote API endpoint with request/response examples under [Postman documentation](https://documenter.getpostman.com/view/1435701/2sA3XY5Hao#c003b5d1-84f1-422c-a7d2-154241aa148c).

### Example Request

<https://api.overtime.io/overtime-v2/networks/10/quote>

#### Request body

```json
{
    "buyInAmount": 20,
    "tradeData": [
        {
            "gameId": "0x3430343338353300000000000000000000000000000000000000000000000000",
            "sportId": 50,
            "typeId": 0,
            "maturity": 1719342000,
            "status": 0,
            "line": 0,
            "playerId": 0,
            "odds": [
                0.740740740741,
                0.102249488753,
                0.208768267223
            ],
            "merkleProof": [
                "0xc4788d799bccce5adea24c9a3088da1072ba0a4e7405184cf164cd8bc8dc715e",
                "0x8f2f3a9252434ac2320a8b9833608ef0bd382a145880216e28fc16048bbdf8b2",
                "0x7fd099566663a5ebede7a59fef79a517fba1d3d41e387393347d7c6934f9d284",
                "0x2673a92127311f5da209b213b893a2593355c8e3861dc58972ce6481a61cdc6e",
                "0x34fb69550251ccd91c37fe74fde3e871edec0cc72b34cf8f81dc062a9576e4e4",
                "0xba41529042360b755dc63ee09acc6e666eeae346d945a1b4067aef22b7e7e2b8"
            ],
            "position": 1,
            "combinedPositions": [
                [],
                [],
                []
            ],
            "live": false
        }
    ],
    "collateral": "THALES"
}
```

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

<table><thead><tr><th width="213">Name</th><th width="224">Type</th><th>Description</th></tr></thead><tbody><tr><td>buyInAmount<mark style="color:red;">*</mark></td><td>number</td><td>(Required) Buy-in amount</td></tr><tr><td>tradeData<mark style="color:red;">*</mark></td><td><a href="#response-parameters-1">TradeData</a>[]</td><td>(Required) Markets data obtained from <a href="overtime-v2-markets-protected">Markets API</a>.</td></tr><tr><td>collateral</td><td>string</td><td>(Optional) Collateral used for trade. If omitted, default collateral will be used for quote.</td></tr></tbody></table>

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

<table><thead><tr><th width="213">Name</th><th width="224">Type</th><th>Description</th></tr></thead><tbody><tr><td>gameId</td><td>string</td><td>Game ID from <a href="../overtime-v2-markets-protected#response-parameters">Markets API response</a>.</td></tr><tr><td>sportId</td><td>number</td><td>Subleague ID from <a href="../overtime-v2-markets-protected#response-parameters">Markets API response</a>.</td></tr><tr><td>typeId</td><td>number</td><td>Type ID from <a href="../overtime-v2-markets-protected#response-parameters">Markets API response</a>.</td></tr><tr><td>maturity</td><td>number</td><td>Maturity from <a href="../overtime-v2-markets-protected#response-parameters">Markets API response</a>.</td></tr><tr><td>status</td><td>number</td><td>Status from <a href="../overtime-v2-markets-protected#response-parameters">Markets API response</a>.</td></tr><tr><td>line</td><td>number</td><td>Line from <a href="../overtime-v2-markets-protected#response-parameters">Markets API response</a>.</td></tr><tr><td>playerId</td><td>number</td><td>Player ID from <a href="../overtime-v2-markets-protected#response-parameters">Markets API response</a>.</td></tr><tr><td>odds</td><td>number[]</td><td>Normalized Implied odds from <a href="../overtime-v2-markets-protected#response-parameters">Markets API response</a>.</td></tr><tr><td>merkleProof</td><td>string[]</td><td>Proof from <a href="../overtime-v2-markets-protected#response-parameters">Markets API response</a>.</td></tr><tr><td>position</td><td>number</td><td>Selected position on the market.</td></tr><tr><td>combinedPositions</td><td><a href="../overtime-v2-markets-protected#combinedposition">CombinedPosition</a>[][]</td><td>Combined positions from <a href="../overtime-v2-markets-protected#response-parameters">Markets API response</a>.</td></tr><tr><td>live</td><td>boolean</td><td>Always <code>false</code>. The quote endpoint is not used for live markets.</td></tr></tbody></table>

### Example Response

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

```json
{
  "quoteData": {
    "totalQuote": {
      "american": 887.8787878745005,
      "decimal": 9.878787878745005,
      "normalizedImplied": 0.10122699386547
    },
    "payout": {
      "THALES": 197.5757575749001,
      "usd": 49.08809212099907,
      "payoutCollateral": "THALES"
    },
    "potentialProfit": {
      "THALES": 177.5757575749001,
      "usd": 44.11905212099907,
      "percentage": 8.878787878745005
    },
    "buyInAmountInUsd": 4.96904
  },
  "liquidityData": {
    "ticketLiquidityInUsd": 1187
  }
}
```

{% endtab %}

{% tab title="200 OK (validation error)" %}

```json
{
    "quoteData": {
        "error": "Not enough liquidity for provided buy-in amount."
    },
    "liquidityData": {
        "ticketLiquidityInUsd": 1260
    }
}
```

{% endtab %}
{% endtabs %}

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

<table><thead><tr><th width="196">Name</th><th width="140">Type</th><th>Description</th></tr></thead><tbody><tr><td>quoteData</td><td><a href="#response-parameters-3">QuoteData</a></td><td>Ticket quote data</td></tr><tr><td>liquidityData</td><td><a href="#liquiditydata">LiquidityData</a></td><td>Ticket liquidity data</td></tr></tbody></table>

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

<table><thead><tr><th width="196">Name</th><th width="143">Type</th><th>Description</th></tr></thead><tbody><tr><td>totalQuote</td><td><a href="../overtime-v2-markets-protected#odds">Odds</a></td><td>Ticket total quote</td></tr><tr><td>payout</td><td><a href="#payoutdata">PayoutData</a></td><td>Ticket payout data</td></tr><tr><td>potentialProfit</td><td><a href="#profitdata">ProfitData</a></td><td>Ticket profit data</td></tr><tr><td>buyInAmountInUsd</td><td>number</td><td>Buy-in amount in default collateral</td></tr></tbody></table>

#### PayoutData

<table><thead><tr><th width="196">Name</th><th width="145">Type</th><th>Description</th></tr></thead><tbody><tr><td>[collateral]</td><td>number</td><td>Potential payout in collateral. Available only for THALES, ETH, or WETH. More about the V2 collateral upgrade in <a href="https://medium.com/@OvertimeMarkets.xyz/overtime-v2-public-beta-is-live-e2109ee4d348">the Medium article</a>.</td></tr><tr><td>usd</td><td>number</td><td>Potential payout in default collateral</td></tr><tr><td>payoutCollateral</td><td>string</td><td>Default payout collateral. For THALES, ETH, or WETH only available payout collateral is the one used for trade. More about the V2 collateral upgrade in <a href="https://medium.com/@OvertimeMarkets.xyz/overtime-v2-public-beta-is-live-e2109ee4d348">the Medium article</a>.</td></tr></tbody></table>

#### ProfitData

<table><thead><tr><th width="196">Name</th><th width="149">Type</th><th>Description</th></tr></thead><tbody><tr><td>[collateral]</td><td>number</td><td>Potential profit in collateral. Available only for THALES, ETH, or WETH. More about the V2 collateral upgrade in <a href="https://medium.com/@OvertimeMarkets.xyz/overtime-v2-public-beta-is-live-e2109ee4d348">the Medium article</a>.</td></tr><tr><td>usd</td><td>number</td><td>Potential profit in default collateral</td></tr><tr><td>percentage</td><td>number</td><td>Potential profit in percentage</td></tr></tbody></table>

#### LiquidityData

<table><thead><tr><th width="196">Name</th><th width="173">Type</th><th>Description</th></tr></thead><tbody><tr><td>ticketLiquidityInUsd</td><td>number</td><td>Available liquidity for the ticket in default collateral</td></tr></tbody></table>
