> ## 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 ordens não casadas

> Lista suas ordens abertas em aberto na exchange

Retorna todas as **ordens abertas** da conta autenticada que estão atualmente em aberto na exchange e disponíveis para casar.

## Requisição

`GET /user/getUnmatched`

Não recebe parâmetros.

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

## Resposta

**data.unmatched** `array`

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

**UnmatchedOrder**

**id** `string`

Id da ordem.

**txID** `string`

Id de transação da criação da ordem.

**type** `string`

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

**bet** `number`

`bet` original (risco).

**odds** `integer`

Odds americanas.

**spread** `number`

Presente em `spread`.

**total** `number`

Presente em `total`.

**participantID** `string`

Presente em `moneyline` e `spread` — o participante que está sendo apoiado.

**otherParticipantID** `string`

O id do participante contrário (cujo lado é oferecido).

**filled** `number`

Risco que já foi casado.

**offered** `number`

Valor original da oferta (casado + restante).

**remaining** `number`

Valor de ganho ainda disponível nesta ordem (o taker paga risco para reivindicá-lo).

**takenRatio** `number`

Fração da ordem que foi casada, entre `0` e `1`.

**expiry** `string`

Marca de tempo de cancelamento (ISO 8601). `null` se nenhuma expiração foi definida.

**createdAt** `string`

Marca de tempo ISO 8601.

**origin** `string`

`offer` ou `wager`.

**userReference** `string`

Identificador definido pelo cliente, preservado desde o momento do envio.

**wagerRequestID** `string`

Id gerado pelo servidor que agrupa cada casamento / oferta derivado da requisição de envio original.

**graded** `boolean`

Sempre `false`.

**closed** `boolean`

**adminRefund** `boolean`

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

### Exemplo

```json JSON theme={null}
{
  "data": {
    "unmatched": [
      {
        "id": "62851e3bd54b74e52c39953c",
        "txID": "62851e3bd54b74e52c39953b",
        "type": "moneyline",
        "bet": 100,
        "odds": 165,
        "spread": null,
        "total": null,
        "participantID": "6165e6e23c65e61a09bf1f73",
        "otherParticipantID": "626dca8a83899580a06ba87e",
        "filled": 0,
        "offered": 100,
        "remaining": 100,
        "takenRatio": 0,
        "expiry": "2022-05-18T23:08:00.000Z",
        "createdAt": "2022-05-18T16:26:35.601Z",
        "origin": "offer",
        "graded": false,
        "closed": false,
        "adminRefund": false,
        "game": {
          "id": "62823d9d75d894042dfee218",
          "league": "NHL",
          "sport": "hockey",
          "start": "2022-05-18T23:08:00.000Z",
          "ended": false,
          "eventName": "NEW YORK RANGERS VS CAROLINA HURRICANES",
          "isFutures": false,
          "participants": [/* ... */]
        }
      }
    ]
  }
}
```


## OpenAPI

````yaml GET /user/getUnmatched
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/getUnmatched:
    get:
      tags:
        - User
      summary: Get unmatched orders
      description: >-
        Return all of the caller's open (unmatched) orders that are currently
        resting on the exchange and available to be matched.
      responses:
        '200':
          description: Unmatched orders list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      unmatched:
                        type: array
                        items:
                          $ref: '#/components/schemas/UnmatchedOrder'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    UnmatchedOrder:
      type: object
      description: An open order that is currently resting on the exchange.
      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
        participantID:
          type: string
          description: Present for `moneyline` / `spread`.
        otherParticipantID:
          type: string
          description: The opposite participant id (the one whose side is being offered).
        expiry:
          type: string
          format: date-time
          nullable: true
        filled:
          type: number
        offered:
          type: number
        remaining:
          type: number
        takenRatio:
          type: number
        createdAt:
          type: string
          format: date-time
        origin:
          type: string
          description: '`offer` or `wager`.'
        graded:
          type: boolean
        closed:
          type: boolean
        adminRefund:
          type: boolean
        userReference:
          type: string
        wagerRequestID:
          type: string
        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).
    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.