> ## 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.

# Obtener volumen cruzado

> Volumen cruzado total del sitio en un rango de fechas

Devuelve el volumen cruzado total del sitio para un rango inclusivo de **días de calendario del Este de EE. UU. (ET)**.

<h2 id="how-volume-is-calculated">
  Cómo se calcula el volumen
</h2>

Cada apuesta cruzada aporta las apuestas de **ambos lados** del cruce:

* la **apuesta del taker** (el importe cruzado), más
* la **apuesta del maker**, derivada de las cuotas del taker: a cuotas positivas del taker es `stake × odds / 100`, a cuotas negativas del taker es `stake × −100 / odds`.

De forma equivalente, desde la perspectiva de cualquiera de las partes cada apuesta cruzada aporta **`risk + win`**: tu apuesta más tu ganancia potencial, porque tu ganancia potencial es exactamente la apuesta de la contraparte. Un take de $100 a +150 cuenta como $250 de volumen ($100 del lado taker + $150 del lado maker).

<Note>
  El volumen usa las apuestas brutas antes de comisión. Los campos `risk` / `win` de [Obtener apuestas cruzadas](/es/pages/rest/user/get-matched-bets) ya incluyen comisión, así que sumarlos diferirá ligeramente de este endpoint.
</Note>

<h2 id="freshness">
  Actualidad
</h2>

Los días ET finalizados se leen de un archivo diario cerrado. Si el rango termina hoy (un `endDate` posterior a hoy se recorta a hoy), se suma un agregado en vivo de los cruces de hoy, de modo que la porción del día actual se actualiza en tiempo real a medida que se cruzan apuestas.

<h2 id="request">
  Solicitud
</h2>

`GET /exchange/getMatchedVolume`

<ParamField query="startDate" type="string" required>
  Primer día de calendario ET del rango, `YYYY-MM-DD` (inclusivo).
</ParamField>

<ParamField query="endDate" type="string" required>
  Último día de calendario ET del rango, `YYYY-MM-DD` (inclusivo). No debe ser anterior a `startDate`. Las fechas posteriores a hoy se recortan a hoy.
</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>

<h2 id="response">
  Respuesta
</h2>

<ResponseField name="data" type="object">
  <Expandable title="data">
    <ResponseField name="startDate" type="string">Eco de la fecha de inicio solicitada.</ResponseField>
    <ResponseField name="endDate" type="string">Eco de la fecha de fin solicitada (antes del recorte).</ResponseField>
    <ResponseField name="matchedVolume" type="number">Volumen cruzado total en USD: la suma de las apuestas de ambos lados (riesgo + ganancia) de cada apuesta cruzada en el rango.</ResponseField>
  </Expandable>
</ResponseField>

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

<h2 id="rate-limits">
  Límites de tasa
</h2>

No hay un límite específico del endpoint: solo aplica el [límite global por IP](/es/pages/rest/introduction#rate-limiting) (3,000 solicitudes por minuto móvil). Para dashboards, consultar una vez cada pocos segundos es más que suficiente; ten en cuenta que los días finalizados nunca cambian, así que solo los rangos que incluyen hoy se benefician de volver a consultar.

<h2 id="errors">
  Errores
</h2>

| Estado | Significado |
| - | - |
| `400` | Falta o está mal formado `startDate` / `endDate` (debe ser `YYYY-MM-DD`), o `startDate` es posterior a `endDate`. |
| `401` | Token de autenticación ausente o inválido. |
| `429` | Se superó el límite de tasa global por IP. Respeta el encabezado `Retry-After`. |
| `503` | Se alcanzó el timeout de 15 segundos del servidor. Es seguro reintentar. |


## 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.