> ## 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 exposição do evento

> Perda no pior caso de um único evento

Calcula a **exposição financeira no pior caso** da conta autenticada para um único evento, levando em conta cada aposta em cada mercado do evento.

O valor é sempre `<= 0`: mesmo um livro totalmente coberto pode incorrer em perda por cancelamentos por chuva, suspensões ou desclassificações.

## Requisição

`GET /user/getGameLiability`

**gameID** `string` *required*

O id do evento para o qual a exposição é calculada.

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

## Resposta

**data.liability** `number`

A perda no pior caso, na moeda da conta. Sempre `<= 0`. Retorna `0` quando a conta autenticada não tem apostas no evento.

### Exemplo

```json JSON theme={null}
{
  "data": { "liability": -125.50 }
}
```


## OpenAPI

````yaml GET /user/getGameLiability
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/getGameLiability:
    get:
      tags:
        - User
      summary: Get game liability
      description: >-
        Calculate the caller's worst-case financial liability for a single game,
        taking into account every bet on every market in the game. The value is
        always `<= 0` — even a fully hedged book can incur loss from rainouts,
        suspensions, or disqualifications.
      parameters:
        - $ref: '#/components/parameters/GameID'
      responses:
        '200':
          description: Liability for the requested game (always `<= 0`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      liability:
                        type: number
                        example: -125.5
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    GameID:
      name: gameID
      in: query
      required: true
      schema:
        type: string
      description: >-
        A 4casters game id (`ObjectID`). Get game ids from `GET
        /exchange/v2/getGames` or `GET /exchange/v2/getOrderbook`.
  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.