> ## 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 game liability

> Worst-case loss on a single game

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.

## Request

`GET /user/getGameLiability`

<ParamField query="gameID" type="string" required>The game id to compute liability for.</ParamField>

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

## Response

<ResponseField name="data.liability" type="number">
  The worst-case loss in account currency. Always `<= 0`. Returns `0` when the caller has no bets on the game.
</ResponseField>

### Example

<CodeGroup>
  ```json JSON theme={null}
  {
    "data": { "liability": -125.50 }
  }
  ```
</CodeGroup>


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

````