> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ticktock.bet/llms.txt
> Use this file to discover all available pages before exploring further.

# Settlement Log

> Cursor-paginated audit log of recent settlements across all matches

## What it returns

Append-only log of every settlement decision — `won` / `lost` / `void` — with the actor (`engine` / `system` / `admin`), reason, and resettlement flag. Use it for:

* **Reconciliation** — daily catch-up against your live AMQP feed.
* **Disputes** — historical record of how a market was graded.
* **Resettlements** — entries with `is_resettlement: true` are corrections to previously-settled markets.

Cursor pagination via `?since_id=<cursor>`. The `id` field on the most recent entry becomes the next call's cursor.

## Required scope

* **Minimum:** `cs2:markets:settlements`

## Reconciliation pattern

```python theme={null}
import requests, time
BASE = "https://ticktock.bet/cs2/v1"
last_id = None
while True:
    params = {"limit": 100}
    if last_id: params["since_id"] = last_id
    resp = requests.get(f"{BASE}/settlements", headers={"X-API-Key": TT_KEY}, params=params)
    for entry in resp.json()["data"]:
        process_settlement(entry)
        last_id = entry["id"]
    time.sleep(30)
```

See [Settlement](/odds-feed/settlement) for the full reconciliation guide.


## OpenAPI

````yaml openapi/cs2-api.json GET /cs2/v1/settlements
openapi: 3.1.0
info:
  title: TickTock B2B API
  description: >-
    Unified CS2 API (``/cs2/v1/*``) plus sport-agnostic ``/v1/*`` meta
    endpoints. Tenant-authenticated via ``X-API-Key`` or ``x-access-token``
    header (REST), or ``api_key`` query parameter (WebSocket). Field visibility
    is gated by per-key scopes — see ``docs/CS2_API_REFERENCE.md`` for the
    catalog and migration.
  version: 1.0.0
servers:
  - url: https://ticktock.bet
    description: Production (same-origin proxy)
  - url: https://feed.ticktock.bet
    description: Production (B2B subdomain)
security: []
paths:
  /cs2/v1/settlements:
    get:
      tags:
        - CS2
      summary: Settlement log (cursor-paginated)
      description: >-
        Immutable audit trail of market settlement state transitions across all
        matches. Use ``?since_id=<uuid>`` to fetch only entries created after a
        previously-seen entry — handles same-millisecond writes correctly.
      operationId: list_settlements_cs2_v1_settlements_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
        - name: since_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: 'Cursor: return entries created after this ID.'
            title: Since Id
          description: 'Cursor: return entries created after this ID.'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response List Settlements Cs2 V1 Settlements Get
              example:
                data:
                  - id: 481234
                    market_offer_id: ofr_abc
                    match_id: 52ef…
                    previous_status: pending
                    new_status: settled
                    outcome: won
                    settled_by: engine
                    is_resettlement: false
                    created_at: '2026-05-10T18:32:14+00:00'
                meta:
                  count: 1
            application/xml: {}
        '401':
          description: >-
            Missing API key. Pass either `X-API-Key: <your-key>` or
            `$x$access-token: <your-key>` on REST calls (or `?api_key=` on
            WebSocket handshakes).
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Human-readable error message.
                required:
                  - detail
              example:
                detail: Missing X-API-Key or $x$access-token header
        '403':
          description: >-
            API key authenticated but lacks the scope required for this
            endpoint, or the path's sport is not in the key's `sport_allowlist`.
            Use `GET /v1/whoami` to inspect the granted scope set.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Human-readable error message.
                required:
                  - detail
              example:
                detail: >-
                  Required scope 'cs2:matches:detail' is not granted to this API
                  key. Contact your account manager to extend the key's scopes.
        '422':
          description: >-
            Validation error — a query/path parameter failed validation. The
            body lists the offending fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - type: enum
                    loc:
                      - query
                      - time_filter
                    msg: 'Input should be one of: 3m, 6m, 1y, all'
                    input: 2w
        '429':
          description: >-
            Tenant rate limit exceeded. Default is 600 req/min per tenant;
            configurable per contract. WebSocket connections are not
            rate-limited at the request layer.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Human-readable error message.
                required:
                  - detail
              example:
                detail: Rate limit exceeded (600 req/min)
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                example: 30
      security:
        - XAPIKeyHeader: []
        - XAccessTokenHeader: []
        - UOFAccessTokenHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    XAPIKeyHeader:
      type: apiKey
      description: Tenant API key issued during onboarding
      in: header
      name: X-API-Key
    XAccessTokenHeader:
      type: apiKey
      description: UOF-standard alias for the tenant API key
      in: header
      name: x-access-token
    UOFAccessTokenHeader:
      type: apiKey
      description: Deprecated alias for x-access-token (backward compatibility)
      in: header
      name: $x$access-token

````