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

# Obter apostas casadas

> Lista apostas que estão casadas mas ainda não liquidadas

Retorna todas as apostas da conta autenticada que foram **casadas mas ainda não liquidadas**: ou seja, posições abertas em eventos que ainda não foram liquidados.

## Requisição

`GET /user/getMatchedBets`

Não recebe parâmetros.

```bash curl theme={null}
curl https://api.4casters.io/user/getMatchedBets \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Resposta

**data.matchedBets** `array`

Array de apostas casadas, ordenadas de forma ascendente por horário de início do evento.

**MatchedBet**

**id** `string`

Id da aposta.

**txID** `string`

Id de transação do casamento.

**type** `string`

`moneyline`, `spread`, `total` ou `moneyline1x2`.

**bet** `number`

Tamanho original da aposta.

**odds** `integer`

Odds americanas no momento do casamento.

**spread** `number`

Presente em `spread`.

**total** `number`

Presente em `total`.

**OU** `string`

`over` ou `under`. Presente em `total`.

**participantID** `string`

Presente em `moneyline` e `spread`.

**market** `string`

Presente em `moneyline1x2`.

**side** `string`

Em `moneyline1x2` — `yes` ou `no`.

**userReference** `string`

Identificador opcional definido pelo cliente, passado no momento do envio.

**createdAt** `string`

Marca de tempo ISO 8601.

**matchedTime** `string`

Marca de tempo ISO 8601 em que o casamento ocorreu.

**origin** `string`

`offer` (você publicou, o taker casou com você) ou `wager` (você tomou liquidez em aberto).

**risk** `string`

Risco da porção casada (formatado como string, 2 casas decimais). Inclui a comissão que você pagaria em uma perda.

**win** `string`

Valor de ganho líquido da comissão que você pagaria em um ganho. Não há um campo `fee` separado nas apostas casadas: a comissão é cobrada na liquidação e só aparece nas apostas liquidadas; até lá ela se reflete em `risk`/`win`.

**graded** `boolean`

Sempre `false` aqui.

**closed** `boolean`

Se a aposta foi encerrada por uma ação de administrador.

**adminRefund** `boolean`

Se um administrador reembolsou a aposta.

<Snippet file="pt-BR/types/game-summary.mdx" />

### Exemplo

```json JSON theme={null}
{
  "data": {
    "matchedBets": [
      {
        "id": "67f45377c18c6697c172afa4",
        "txID": "67f45377c18c6697c172afa3",
        "type": "moneyline",
        "bet": 50,
        "odds": -185,
        "participantID": "5d48bd5198366d41ec7238da",
        "userReference": "my-ref-123",
        "createdAt": "2025-09-24T19:30:59.482Z",
        "matchedTime": "2025-09-24T19:30:59.482Z",
        "origin": "wager",
        "risk": "50.27",
        "win": "27.16",
        "graded": false,
        "closed": false,
        "adminRefund": false,
        "game": {
          "id": "688c0516fbc14da0c202d426",
          "league": "NBA",
          "sport": "basketball",
          "start": "2025-09-25T00:10:00.000Z",
          "ended": false,
          "eventName": "TORONTO RAPTORS VS PHILADELPHIA 76ERS",
          "isFutures": false,
          "participants": [/* ... */]
        }
      }
    ]
  }
}
```


## OpenAPI

````yaml GET /user/getMatchedBets
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:
  /user/getMatchedBets:
    get:
      tags:
        - User
      summary: Get matched (ungraded) bets
      description: >-
        Return all of the caller's bets that have been matched but not yet
        graded.
      responses:
        '200':
          description: Matched bets list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      matchedBets:
                        type: array
                        items:
                          $ref: '#/components/schemas/MatchedBet'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    MatchedBet:
      type: object
      description: A bet that has been matched but not yet graded.
      properties:
        id:
          type: string
        txID:
          type: string
        type:
          $ref: '#/components/schemas/MarketType'
        bet:
          type: number
        odds:
          type: integer
        spread:
          type: number
          nullable: true
        total:
          type: number
          nullable: true
        OU:
          type: string
          enum:
            - over
            - under
          description: Present for `total`.
        participantID:
          type: string
          description: Present for `moneyline` / `spread`.
        market:
          type: string
          description: Present for `moneyline1x2`.
        side:
          $ref: '#/components/schemas/MarketSide'
        userReference:
          type: string
        createdAt:
          type: string
          format: date-time
        matchedTime:
          type: string
          format: date-time
        graded:
          type: boolean
        closed:
          type: boolean
        origin:
          type: string
          description: '`offer` or `wager`.'
        adminRefund:
          type: boolean
        risk:
          type: string
          description: >-
            Risk on the matched portion, inclusive of the commission charged on
            a loss.
        win:
          type: string
          description: Win amount net of the commission charged on a win.
        game:
          $ref: '#/components/schemas/GameSummary'
    MarketType:
      type: string
      enum:
        - moneyline
        - spread
        - total
        - moneyline1x2
      description: >-
        Market type. `moneyline1x2` is **soccer-only** (three-way money line:
        home / away / draw).
    MarketSide:
      type: string
      description: |-
        Order side. Meaning depends on `type`:

        - `moneyline`, `spread` — the participant id you are backing.
        - `total` — `"over"` or `"under"`.
        - `moneyline1x2` — `"yes"` or `"no"` on the outcome named by `market`.
    GameSummary:
      type: object
      properties:
        id:
          type: string
        league:
          type: string
        sport:
          type: string
        start:
          type: string
          format: date-time
        ended:
          type: boolean
        eventName:
          type: string
          nullable: true
        isFutures:
          type: boolean
        participants:
          type: array
          items:
            $ref: '#/components/schemas/Participant'
    Participant:
      type: object
      properties:
        id:
          type: string
        longName:
          type: string
        shortName:
          type: string
        homeAway:
          type: string
          enum:
            - home
            - away
        mainPitcher:
          type: string
          nullable: true
        rotationNumber:
          type: string
          nullable: true
        futuresSide:
          type: string
          nullable: true
        score:
          type: number
          description: Final score; only present for ended games.
  responses:
    Unauthorized:
      description: Missing or invalid auth token
  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.