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

# 按游標獲取已結算投注

> 使用游標按結算順序輪詢已結算投注，使本地副本保持同步

**按結算順序**分頁回傳你的**已結算（已判定）投注**。每個回應都會給你一個 `cursor`；將其發回即可獲取下一頁。這樣你無需猜測日期視窗，就能讓本地投注歷史副本保持同步。

回傳的行與 [獲取已結算投注](https://docs.4casters.io/zh-Hant/pages/rest/user/get-graded.md) 完全相同：每筆成交一行，從你的一側給出，並內嵌賽事資訊。

## 如何輪詢

1. \*\*首次呼叫：\*\*傳送 `since`，即一個 ISO 8601 時間戳記。你會得到在該時刻之後（不含）結算的投注，按從舊到新排列，外加一個 `cursor`。
2. \*\*之後的每次呼叫：\*\*傳送最新的 `cursor`，**每秒一次**。
3. 若回應中 `hasMore: true`，請使用新游標**立即**再次呼叫，直到 `hasMore` 為 `false`。然後恢復為每秒一次。

空頁會原樣回傳你的游標，因此輪詢方永遠不會丟失位置。請將游標視為不透明值：切勿自行構造或修改。不是由此端點簽發的游標會以 `400` 拒絕。

```js theme={null}
let cursor = firstResponse.data.cursor; // from your one-time ?since=<ISO> call
while (true) {
  let hasMore = true;
  while (hasMore) {
    const res = await get('/user/v2/getGradedSince', { cursor });
    if (res.status === 429) { await sleep(res.headers['retry-after'] * 1000); continue; } // same cursor
    for (const row of res.data.graded) upsert(row.txID, row);
    cursor = res.data.cursor;
    hasMore = res.data.hasMore;
  }
  await sleep(1000);
}
```

> [!NOTE]
>
> **按 `txID` 執行 upsert，而不是追加。** 若投注的結算發生變化 — 退款，或比分更正後重新判定 — 它可能會再次回傳。它會在遍歷的更後位置重新出現；以最新版本為準。

## 使用 `settledThrough` 恢復

每個回應還包含 `settledThrough`，一個 ISO 8601 時間戳記：表示你已持有在該時刻或之前結算的**全部**投注。

如果你不想儲存不透明的游標，可以用 `since=settledThrough` 恢復。這樣不會遺漏任何投注。你可能會再次看到少量行，因為多筆投注可能在同一毫秒內結算，而一頁可能恰好在它們中間結束；請按 `txID` 去重。`cursor` 仍是精確的位置。

## 請求

`GET /user/v2/getGradedSince`

同樣的參數也可以通過 `POST /user/v2/getGradedSince` 以 JSON 請求主體傳送。`since` 和 `cursor` 必須且只能傳送其中一個。

**since** `string`

僅首次呼叫。回傳在此 ISO 8601 時刻之後（不含）結算的投注。

**cursor** `string`

之後的每次呼叫。原樣傳送上一個回應中的 `cursor`。

```bash 首次呼叫 theme={null}
curl "https://api.4casters.io/user/v2/getGradedSince?since=2026-08-01T00:00:00.000Z" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

```bash 後續呼叫 theme={null}
curl "https://api.4casters.io/user/v2/getGradedSince?cursor=CURSOR_FROM_LAST_RESPONSE" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## 回應

**data.graded** `array`

最多 **100** 筆已結算成交，按結算時間從早到晚排列。欄位與 [獲取已結算投注](https://docs.4casters.io/zh-Hant/pages/rest/user/get-graded.md#response) 相同。

**data.cursor** `string`

你的新位置。在下次呼叫時作為 `cursor` 傳送。空頁時即為你傳送的游標。

**data.hasMore** `boolean`

若已有下一頁可取則為 `true` — 請立即再次呼叫。

**data.settledThrough** `string`

ISO 8601。你已持有在該時刻或之前結算的全部投注。可安全地用 `since` 從此處恢復。

### 示例

```json JSON theme={null}
{
  "data": {
    "graded": [
      {
        "txID": "66b2a1f0c3e4d5a6b7c8d9e0",
        "id": "66b2a1e9c3e4d5a6b7c8d9d1",
        "origin": "wager",
        "type": "total",
        "outcome": "loser",
        "bet": 100,
        "odds": -110,
        "total": 8.5,
        "OU": "over",
        "fee": "1.00",
        "risk": "101.00",
        "win": "89.91",
        "result": "-101.00",
        "settledAt": "2026-08-02T02:41:57.003Z",
        "game": { "id": "66b0f4e2a9b8c7d6e5f4a3b2", "league": "MLB" /* ... */ }
      }
    ],
    "cursor": "gc_9QmT4xR2vK7pL1sN8wZ3",
    "hasMore": false,
    "settledThrough": "2026-08-02T02:41:57.003Z"
  }
}
```

## 速率限制

**每使用者每 5 秒 10 次請求**，併疊加 [全域每 IP 限制](https://docs.4casters.io/zh-Hant/pages/rate-limiting.md#per-ip-rest)。這在每秒輪詢一次的同時，仍留有餘量來消化積壓。

即時結算永遠不會填滿一頁 — 每秒最多幾行 — 因此 `hasMore` 只有在停機後追趕進度時才會真正觸發。一個繁忙帳戶一整天的結算大約 12 秒即可消化完畢。

如果收到 `429`，請等待 `Retry-After` 秒，然後重新發送**同一個**游標。

## 錯誤

| 狀態 | 含義 |
| - | - |
| `400` | 同時傳送了 `since` 和 `cursor`、`since` 格式錯誤，或游標不是由此端點簽發的。 |
| `401` | 認證令牌缺失或無效。 |
| `403` | 你的帳戶無權使用此端點。 |
| `429` | 觸發速率限制。請等待 `Retry-After` 秒，然後重新發送同一個游標。 |


## OpenAPI

````yaml sources/core-api.openapi.json GET /user/v2/getGradedSince
openapi: 3.0.3
info:
  title: 4casters API
  version: 1.0.0
  description: >-
    Programmatic access to the 4casters peer-to-peer betting exchange. Generated
    from the service itself — every documented endpoint is described by the same
    schema that validates its requests.
  x-audience: public
servers:
  - url: https://api.4casters.io
security: []
paths:
  /user/v2/getGradedSince:
    get:
      tags:
        - Graded bets
      summary: Get graded bets since a cursor
      description: >-
        Your settled (graded) bets in **settlement order**, paged by an opaque
        cursor — the way to keep a local copy of your bet history in sync
        without guessing date windows.


        **First call:** send `since` (ISO 8601). You get the bets settled
        strictly after that instant, oldest first, plus a `cursor`.


        **Every call after that — the recommended loop:** poll **once per
        second** with your latest `cursor`. If a response has `hasMore: true`,
        there is more to fetch — call again immediately with the new cursor
        until `hasMore` is false, then go back to polling once per second. Never
        construct or modify a cursor; a cursor you did not receive from this
        endpoint is rejected with `400`. An empty page returns your cursor
        unchanged, so a poller never loses its place.


        ```js

        let cursor = firstResponse.data.cursor; // from your one-time
        ?since=<ISO> call

        while (true) {
          let hasMore = true;
          while (hasMore) {
            const res = await get('/user/v2/getGradedSince', { cursor });
            if (res.status === 429) { await sleep(res.headers['retry-after'] * 1000); continue; } // same cursor
            for (const row of res.data.graded) upsert(row.txID, row);
            cursor = res.data.cursor;
            hasMore = res.data.hasMore;
          }
          await sleep(1000);
        }

        ```


        Rows are exactly `getGraded`'s rows (per fill, your side, game
        embedded). A bet can appear again later if its settlement changes — a
        refund, or a regrade after a score correction — with a newer position in
        the walk; treat `txID` as the row's identity and let the latest version
        win.


        Pages are a fixed **100 rows**, and the endpoint is rate limited to **10
        requests per 5 seconds per user**. That leaves room to drain a burst
        while polling once per second; live settlement never fills a page (a few
        rows per second at most), so `hasMore` effectively only fires when you
        are catching up after downtime — a day of a busy account's settlements
        drains in about 12 seconds. If you do get a `429`, wait `Retry-After`
        seconds and resend the **same** cursor. One second is the recommended
        and, in practice, the maximum polling rate.


        **`settledThrough` — the human-readable position.** Every response also
        carries `settledThrough`, an ISO timestamp meaning *you now hold every
        bet settled at or before this instant*. Several bets can settle in the
        same millisecond, and a page can end inside such a group;
        `settledThrough` then steps back to the last instant that is complete,
        so it is always safe. If you would rather not store an opaque token,
        resume with `since=settledThrough`: you can never miss a bet that way,
        you may just see the rows of that last group again (dedupe by `txID`).
        The `cursor` remains the exact position


        Also accepts `POST` with the same parameters sent as a JSON body.
      parameters:
        - name: since
          in: query
          required: false
          description: >-
            First call: return bets settled strictly after this instant.
            Mutually exclusive with `cursor`.
          schema:
            type: string
            example: '2026-08-01T00:00:00.000Z'
        - name: cursor
          in: query
          required: false
          description: >-
            Subsequent calls: the `cursor` from the previous response, verbatim.
            Mutually exclusive with `since`.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      graded:
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                game:
                                  anyOf:
                                    - type: object
                                      properties:
                                        isSpecials:
                                          type: boolean
                                        isYesNo:
                                          description: >-
                                            A Yes/No market: name it by eventName,
                                            its sides by homeAway (away = Yes).
                                          type: boolean
                                        eventName:
                                          type: string
                                        tournamentName:
                                          nullable: true
                                          type: string
                                        periodName:
                                          type: string
                                        id:
                                          type: string
                                          pattern: ^[0-9a-fA-F]{24}$
                                        ended:
                                          type: boolean
                                        league:
                                          type: string
                                        live:
                                          type: boolean
                                        parentGameID:
                                          nullable: true
                                          type: string
                                          pattern: ^[0-9a-fA-F]{24}$
                                        start:
                                          type: string
                                          description: ISO 8601 timestamp
                                          example: '2026-08-01T00:00:00.000Z'
                                        sport:
                                          type: string
                                        participants:
                                          type: array
                                          items:
                                            anyOf:
                                              - type: object
                                                properties:
                                                  id:
                                                    type: string
                                                    pattern: ^[0-9a-fA-F]{24}$
                                                  longName:
                                                    type: string
                                                  shortName:
                                                    type: string
                                                  mainPitcher:
                                                    type: string
                                                  homeAway:
                                                    description: Absent on outright games.
                                                    type: string
                                                    enum:
                                                      - home
                                                      - away
                                                  score:
                                                    type: number
                                                  rotationNumber:
                                                    type: string
                                                  futuresSide:
                                                    type: string
                                                required:
                                                  - id
                                                  - longName
                                                  - shortName
                                                  - futuresSide
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  id:
                                                    type: string
                                                    pattern: ^[0-9a-fA-F]{24}$
                                                  longName:
                                                    type: string
                                                  shortName:
                                                    type: string
                                                  mainPitcher:
                                                    type: string
                                                  homeAway:
                                                    description: Absent on outright games.
                                                    type: string
                                                    enum:
                                                      - home
                                                      - away
                                                  score:
                                                    type: number
                                                  rotationNumber:
                                                    type: string
                                                  futuresSide:
                                                    type: string
                                                required:
                                                  - id
                                                  - longName
                                                  - shortName
                                                  - futuresSide
                                                additionalProperties: false
                                          minItems: 2
                                          maxItems: 2
                                          description: Away participant first, then home.
                                      required:
                                        - isSpecials
                                        - tournamentName
                                        - periodName
                                        - id
                                        - league
                                        - live
                                        - sport
                                        - participants
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        _id:
                                          type: string
                                        error:
                                          type: string
                                      required:
                                        - _id
                                        - error
                                      additionalProperties: false
                                      description: >-
                                        The entity could not be loaded; `_id`
                                        identifies it.
                                outcome:
                                  type: string
                                  enum:
                                    - winner
                                    - loser
                                    - half-win
                                    - half-loss
                                    - refunded
                                id:
                                  type: string
                                  pattern: ^[0-9a-fA-F]{24}$
                                  description: The order (session) id.
                                graded:
                                  type: boolean
                                type:
                                  type: string
                                  enum:
                                    - moneyline
                                    - spread
                                    - total
                                    - moneyline1x2
                                    - outright
                                bet:
                                  type: number
                                  description: Your stake on this fill.
                                txID:
                                  type: string
                                  pattern: ^[0-9a-fA-F]{24}$
                                  description: The fill (take transaction) id.
                                closed:
                                  type: boolean
                                  enum:
                                    - false
                                createdAt:
                                  type: string
                                  description: ISO 8601 timestamp
                                  example: '2026-08-01T00:00:00.000Z'
                                adminRefund:
                                  type: boolean
                                wagerRequestID:
                                  nullable: true
                                  type: string
                                  pattern: ^[0-9a-fA-F]{24}$
                                userReference:
                                  nullable: true
                                  type: string
                                isPostArb:
                                  type: boolean
                                  enum:
                                    - true
                                isOutright:
                                  type: boolean
                                  enum:
                                    - true
                                outrightParticipant:
                                  type: object
                                  properties:
                                    longName:
                                      type: string
                                    shortName:
                                      type: string
                                    outcome:
                                      type: string
                                  required:
                                    - longName
                                    - shortName
                                  additionalProperties: false
                                ticketNumber:
                                  type: string
                                odds:
                                  type: number
                                  description: American odds from your perspective.
                                matchedTime:
                                  type: string
                                  description: ISO 8601 timestamp
                                  example: '2026-08-01T00:00:00.000Z'
                                settledAt:
                                  type: string
                                  description: ISO 8601 timestamp
                                  example: '2026-08-01T00:00:00.000Z'
                                fee:
                                  type: string
                                  description: Commission actually charged on this fill.
                                platform:
                                  type: string
                                risk:
                                  type: string
                                  description: Stake plus commission.
                                win:
                                  type: string
                                  description: Gross winnings minus commission.
                                result:
                                  description: >-
                                    Signed settled P&L; absent when the outcome
                                    is unknown.
                                  type: string
                                origin:
                                  type: string
                                  enum:
                                    - wager
                                  description: You took this order.
                                cancelled:
                                  type: boolean
                                  enum:
                                    - false
                                participantID:
                                  nullable: true
                                  type: string
                                  pattern: ^[0-9a-fA-F]{24}$
                                spread:
                                  type: number
                                total:
                                  type: number
                                OU:
                                  type: string
                                  enum:
                                    - over
                                    - under
                                side:
                                  type: string
                                  enum:
                                    - 'yes'
                                    - 'no'
                                market:
                                  type: string
                              required:
                                - game
                                - id
                                - type
                                - bet
                                - txID
                                - closed
                                - ticketNumber
                                - odds
                                - fee
                                - risk
                                - win
                                - origin
                                - cancelled
                              additionalProperties: false
                            - type: object
                              properties:
                                game:
                                  anyOf:
                                    - type: object
                                      properties:
                                        isSpecials:
                                          type: boolean
                                        isYesNo:
                                          description: >-
                                            A Yes/No market: name it by eventName,
                                            its sides by homeAway (away = Yes).
                                          type: boolean
                                        eventName:
                                          type: string
                                        tournamentName:
                                          nullable: true
                                          type: string
                                        periodName:
                                          type: string
                                        id:
                                          type: string
                                          pattern: ^[0-9a-fA-F]{24}$
                                        ended:
                                          type: boolean
                                        league:
                                          type: string
                                        live:
                                          type: boolean
                                        parentGameID:
                                          nullable: true
                                          type: string
                                          pattern: ^[0-9a-fA-F]{24}$
                                        start:
                                          type: string
                                          description: ISO 8601 timestamp
                                          example: '2026-08-01T00:00:00.000Z'
                                        sport:
                                          type: string
                                        participants:
                                          type: array
                                          items:
                                            anyOf:
                                              - type: object
                                                properties:
                                                  id:
                                                    type: string
                                                    pattern: ^[0-9a-fA-F]{24}$
                                                  longName:
                                                    type: string
                                                  shortName:
                                                    type: string
                                                  mainPitcher:
                                                    type: string
                                                  homeAway:
                                                    description: Absent on outright games.
                                                    type: string
                                                    enum:
                                                      - home
                                                      - away
                                                  score:
                                                    type: number
                                                  rotationNumber:
                                                    type: string
                                                  futuresSide:
                                                    type: string
                                                required:
                                                  - id
                                                  - longName
                                                  - shortName
                                                  - futuresSide
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  id:
                                                    type: string
                                                    pattern: ^[0-9a-fA-F]{24}$
                                                  longName:
                                                    type: string
                                                  shortName:
                                                    type: string
                                                  mainPitcher:
                                                    type: string
                                                  homeAway:
                                                    description: Absent on outright games.
                                                    type: string
                                                    enum:
                                                      - home
                                                      - away
                                                  score:
                                                    type: number
                                                  rotationNumber:
                                                    type: string
                                                  futuresSide:
                                                    type: string
                                                required:
                                                  - id
                                                  - longName
                                                  - shortName
                                                  - futuresSide
                                                additionalProperties: false
                                          minItems: 2
                                          maxItems: 2
                                          description: Away participant first, then home.
                                      required:
                                        - isSpecials
                                        - tournamentName
                                        - periodName
                                        - id
                                        - league
                                        - live
                                        - sport
                                        - participants
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        _id:
                                          type: string
                                        error:
                                          type: string
                                      required:
                                        - _id
                                        - error
                                      additionalProperties: false
                                      description: >-
                                        The entity could not be loaded; `_id`
                                        identifies it.
                                outcome:
                                  type: string
                                  enum:
                                    - winner
                                    - loser
                                    - half-win
                                    - half-loss
                                    - refunded
                                id:
                                  type: string
                                  pattern: ^[0-9a-fA-F]{24}$
                                  description: The order (session) id.
                                graded:
                                  type: boolean
                                type:
                                  type: string
                                  enum:
                                    - moneyline
                                    - spread
                                    - total
                                    - moneyline1x2
                                    - outright
                                bet:
                                  type: number
                                  description: Your stake on this fill.
                                txID:
                                  type: string
                                  pattern: ^[0-9a-fA-F]{24}$
                                  description: The fill (take transaction) id.
                                closed:
                                  type: boolean
                                  enum:
                                    - false
                                createdAt:
                                  type: string
                                  description: ISO 8601 timestamp
                                  example: '2026-08-01T00:00:00.000Z'
                                adminRefund:
                                  type: boolean
                                wagerRequestID:
                                  nullable: true
                                  type: string
                                  pattern: ^[0-9a-fA-F]{24}$
                                userReference:
                                  nullable: true
                                  type: string
                                isPostArb:
                                  type: boolean
                                  enum:
                                    - true
                                isOutright:
                                  type: boolean
                                  enum:
                                    - true
                                outrightParticipant:
                                  type: object
                                  properties:
                                    longName:
                                      type: string
                                    shortName:
                                      type: string
                                    outcome:
                                      type: string
                                  required:
                                    - longName
                                    - shortName
                                  additionalProperties: false
                                ticketNumber:
                                  type: string
                                odds:
                                  type: number
                                  description: American odds from your perspective.
                                matchedTime:
                                  type: string
                                  description: ISO 8601 timestamp
                                  example: '2026-08-01T00:00:00.000Z'
                                settledAt:
                                  type: string
                                  description: ISO 8601 timestamp
                                  example: '2026-08-01T00:00:00.000Z'
                                fee:
                                  type: string
                                  description: Commission actually charged on this fill.
                                platform:
                                  type: string
                                risk:
                                  type: string
                                  description: Stake plus commission.
                                win:
                                  type: string
                                  description: Gross winnings minus commission.
                                result:
                                  description: >-
                                    Signed settled P&L; absent when the outcome
                                    is unknown.
                                  type: string
                                origin:
                                  type: string
                                  enum:
                                    - offer
                                  description: You posted the order that was taken.
                                takenRatio:
                                  type: number
                                  description: >-
                                    How much of the order's full volume has been
                                    filled, 0–1.
                                cancelled:
                                  type: boolean
                                expiry:
                                  nullable: true
                                  type: string
                                  description: ISO 8601 timestamp
                                  example: '2026-08-01T00:00:00.000Z'
                                rebate:
                                  description: >-
                                    Maker rebate paid on this fill, as a decimal
                                    string with five decimals. Present only when
                                    one was paid.
                                  type: string
                                spread:
                                  nullable: true
                                  type: number
                                total:
                                  nullable: true
                                  type: number
                                participantID:
                                  nullable: true
                                  type: string
                                  pattern: ^[0-9a-fA-F]{24}$
                                OU:
                                  type: string
                                  enum:
                                    - over
                                    - under
                                side:
                                  type: string
                                  enum:
                                    - 'yes'
                                    - 'no'
                                market:
                                  type: string
                              required:
                                - game
                                - id
                                - type
                                - bet
                                - txID
                                - closed
                                - ticketNumber
                                - odds
                                - fee
                                - risk
                                - win
                                - origin
                                - takenRatio
                                - spread
                                - total
                              additionalProperties: false
                            - type: object
                              properties:
                                txID:
                                  type: string
                                  pattern: ^[0-9a-fA-F]{24}$
                                ticketNumber:
                                  type: string
                                id:
                                  type: object
                                  properties:
                                    _id:
                                      type: string
                                    error:
                                      type: string
                                  required:
                                    - _id
                                    - error
                                  additionalProperties: false
                                  description: >-
                                    The entity could not be loaded; `_id`
                                    identifies it.
                                game:
                                  anyOf:
                                    - type: object
                                      properties:
                                        isSpecials:
                                          type: boolean
                                        isYesNo:
                                          description: >-
                                            A Yes/No market: name it by eventName,
                                            its sides by homeAway (away = Yes).
                                          type: boolean
                                        eventName:
                                          type: string
                                        tournamentName:
                                          nullable: true
                                          type: string
                                        periodName:
                                          type: string
                                        id:
                                          type: string
                                          pattern: ^[0-9a-fA-F]{24}$
                                        ended:
                                          type: boolean
                                        league:
                                          type: string
                                        live:
                                          type: boolean
                                        parentGameID:
                                          nullable: true
                                          type: string
                                          pattern: ^[0-9a-fA-F]{24}$
                                        start:
                                          type: string
                                          description: ISO 8601 timestamp
                                          example: '2026-08-01T00:00:00.000Z'
                                        sport:
                                          type: string
                                        participants:
                                          type: array
                                          items:
                                            anyOf:
                                              - type: object
                                                properties:
                                                  id:
                                                    type: string
                                                    pattern: ^[0-9a-fA-F]{24}$
                                                  longName:
                                                    type: string
                                                  shortName:
                                                    type: string
                                                  mainPitcher:
                                                    type: string
                                                  homeAway:
                                                    description: Absent on outright games.
                                                    type: string
                                                    enum:
                                                      - home
                                                      - away
                                                  score:
                                                    type: number
                                                  rotationNumber:
                                                    type: string
                                                  futuresSide:
                                                    type: string
                                                required:
                                                  - id
                                                  - longName
                                                  - shortName
                                                  - futuresSide
                                                additionalProperties: false
                                              - type: object
                                                properties:
                                                  id:
                                                    type: string
                                                    pattern: ^[0-9a-fA-F]{24}$
                                                  longName:
                                                    type: string
                                                  shortName:
                                                    type: string
                                                  mainPitcher:
                                                    type: string
                                                  homeAway:
                                                    description: Absent on outright games.
                                                    type: string
                                                    enum:
                                                      - home
                                                      - away
                                                  score:
                                                    type: number
                                                  rotationNumber:
                                                    type: string
                                                  futuresSide:
                                                    type: string
                                                required:
                                                  - id
                                                  - longName
                                                  - shortName
                                                  - futuresSide
                                                additionalProperties: false
                                          minItems: 2
                                          maxItems: 2
                                          description: Away participant first, then home.
                                      required:
                                        - isSpecials
                                        - tournamentName
                                        - periodName
                                        - id
                                        - league
                                        - live
                                        - sport
                                        - participants
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        _id:
                                          type: string
                                        error:
                                          type: string
                                      required:
                                        - _id
                                        - error
                                      additionalProperties: false
                                      description: >-
                                        The entity could not be loaded; `_id`
                                        identifies it.
                                settledAt:
                                  type: string
                                  description: ISO 8601 timestamp
                                  example: '2026-08-01T00:00:00.000Z'
                                matchedTime:
                                  type: string
                                  description: ISO 8601 timestamp
                                  example: '2026-08-01T00:00:00.000Z'
                              required:
                                - txID
                                - ticketNumber
                                - id
                                - game
                              additionalProperties: false
                      hasMore:
                        type: boolean
                        description: Whether another page follows.
                      cursor:
                        type: string
                        description: >-
                          Opaque walk position. Send it back as `cursor` to get
                          the next page; on an empty page it is your request
                          cursor, unchanged.
                      settledThrough:
                        type: string
                        description: >-
                          You now hold every bet settled at or before this
                          instant. A human-readable resume point:
                          `since=settledThrough` never misses a bet and may only
                          repeat the last millisecond group (dedupe by `txID`).
                        example: '2026-08-01T00:00:00.000Z'
                    required:
                      - graded
                      - hasMore
                      - cursor
                      - settledThrough
                    additionalProperties: false
                required:
                  - data
                additionalProperties: false
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid auth token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The account may not perform this action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited — see Retry-After
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - authToken: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
      additionalProperties: false
  securitySchemes:
    authToken:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        The auth token returned by `POST /user/login` (`data.user.auth`), sent
        as the raw header value — no `Bearer` prefix.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.