> ## Documentation Index
> Fetch the complete documentation index at: https://docs.4casters.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get matched volume

> Total sitewide matched volume over a date range

Returns the total sitewide matched volume for an inclusive range of **US-Eastern (ET) calendar days**.

## How volume is calculated

Every matched bet contributes the stakes of **both sides** of the match:

* the **taker's stake** (the amount matched), plus
* the **maker's stake**, derived from the taker odds — at positive taker odds it's `stake × odds / 100`, at negative taker odds it's `stake × −100 / odds`.

Equivalently, from either party's perspective each matched bet contributes **`risk + win`** — your stake plus your potential profit, because your potential profit is exactly the counterparty's stake. A $100 take at +150 counts as $250 of volume ($100 taker side + $150 maker side).

<Note>
  Volume uses the raw pre-commission stakes. The `risk` / `win` fields on [Get matched bets](/pages/rest/user/get-matched-bets) have commission baked in, so summing those will differ slightly from this endpoint.
</Note>

## Freshness

Finished ET days are read from a finalized daily archive. If the range ends today (an `endDate` past today is clamped to today), a live aggregate of today's matches is added on top, so the current day's portion updates in real time as bets match.

## Request

`GET /exchange/getMatchedVolume`

<ParamField query="startDate" type="string" required>
  First ET calendar day of the range, `YYYY-MM-DD` (inclusive).
</ParamField>

<ParamField query="endDate" type="string" required>
  Last ET calendar day of the range, `YYYY-MM-DD` (inclusive). Must not be before `startDate`. Dates after today are clamped to today.
</ParamField>

<CodeGroup>
  ```bash curl theme={null}
  curl "https://api.4casters.io/exchange/getMatchedVolume?startDate=2026-08-10&endDate=2026-08-11" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```
</CodeGroup>

## Response

<ResponseField name="data" type="object">
  <Expandable title="data">
    <ResponseField name="startDate" type="string">Echo of the requested start date.</ResponseField>
    <ResponseField name="endDate" type="string">Echo of the requested end date (before clamping).</ResponseField>
    <ResponseField name="matchedVolume" type="number">Total matched volume in USD: the sum of both sides' stakes (risk + win) of every bet matched in the range.</ResponseField>
  </Expandable>
</ResponseField>

```json Example response theme={null}
{
  "data": {
    "startDate": "2026-08-10",
    "endDate": "2026-08-11",
    "matchedVolume": 6447933.012757301
  }
}
```

## Rate limits

There is no endpoint-specific limit — only the [global per-IP limit](/pages/rest/introduction#rate-limiting) (3,000 requests per rolling minute) applies. For dashboards, polling once every few seconds is more than fine; note that finalized days never change, so only ranges that include today benefit from re-polling at all.

## Errors

| Status | Meaning |
| - | - |
| `400` | Missing or malformed `startDate` / `endDate` (must be `YYYY-MM-DD`), or `startDate` after `endDate`. |
| `401` | Missing or invalid auth token. |
| `429` | Global per-IP rate limit exceeded. Honor the `Retry-After` header. |
| `503` | Server-side 15-second timeout was hit. Safe to retry. |


## OpenAPI

````yaml GET /exchange/getMatchedVolume
openapi: 3.1.0
info:
  title: 4casters REST API
  version: 1.0.0
  description: >-
    Public REST API for the 4casters peer-to-peer betting exchange. Use this API
    to manage your account, query the orderbook and games, and place / edit /
    cancel orders.


    All responses (unless noted otherwise) are JSON envelopes of the form `{
    "data": ... }`.
  contact:
    name: 4casters
    url: https://4casters.io
servers:
  - url: https://api.4casters.io
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Login and account session management
  - name: User
    description: Read account info, bets, and orders
  - name: Orders
    description: Place, edit, look up, and cancel orders
  - name: Markets
    description: Browse leagues, games, participants, and orderbooks
  - name: Affiliate
    description: Affiliate / referral commission
paths:
  /exchange/getMatchedVolume:
    get:
      tags:
        - Markets
      summary: Get matched volume
      description: >-
        Return total sitewide matched volume for an inclusive range of
        US-Eastern (ET) calendar days.


        Every matched bet contributes the stakes of **both** sides to the total:
        the taker's stake plus the maker's stake (derived from the taker odds).
        Equivalently, from either party's perspective each match contributes
        `risk + win` — your stake plus your potential profit, which is exactly
        the counterparty's stake. Commission is not included.


        Past days are read from a finalized daily archive; a range that ends
        today (or later — the end is clamped to today) additionally includes a
        live aggregate of today's matches, so today's portion updates in real
        time.
      parameters:
        - name: startDate
          in: query
          required: true
          schema:
            type: string
            format: date
            example: '2026-08-01'
          description: First ET calendar day of the range (`YYYY-MM-DD`, inclusive).
        - name: endDate
          in: query
          required: true
          schema:
            type: string
            format: date
            example: '2026-08-11'
          description: >-
            Last ET calendar day of the range (`YYYY-MM-DD`, inclusive). Dates
            after today are clamped to today. Must not be before `startDate`.
      responses:
        '200':
          description: Total matched volume for the range
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      startDate:
                        type: string
                        format: date
                        description: Echo of the requested start date.
                      endDate:
                        type: string
                        format: date
                        description: Echo of the requested end date (before clamping).
                      matchedVolume:
                        type: number
                        description: >-
                          Total matched volume in USD: the sum of both sides'
                          stakes (risk + win) of every bet matched in the range.
                example:
                  data:
                    startDate: '2026-08-10'
                    endDate: '2026-08-11'
                    matchedVolume: 6447933.01
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HttpError'
    Unauthorized:
      description: Missing or invalid auth token
  schemas:
    HttpError:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Pass your auth token in the `Authorization` header. The `Bearer` prefix
        is optional; the server also accepts a signed `auth` cookie or a `token`
        field in the request body.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.