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

# GraphQL — playerBets / pendingBetCount

> Indexed wallet history with status filters and offset pagination, plus the pending-bet counter.

Wallet history from the API's indexed store. Guide-level usage: [History](/integrate/history).

## playerBets

```graphql GraphQL theme={"theme":"css-variables"}
query ($player: String!) {
  playerBets(
    networkId: ROBINHOOD_TESTNET
    player: $player
    filter: { status: SETTLED }
    limit: 50
    offset: 0
  ) {
    totalCount
    source
    items {
      betId
      mode
      status
      stake
      liability
      payout
      commitId
      platform
      game
      placedAt
      settledAt
      claimedAt
      claimAsset
      placeTxHash
      settleTxHash
      claimTxHash
      proof
      entropy
      proofStatus
    }
  }
}
```

### Arguments

| Arg         | Type              | Notes                                                                           |
| ----------- | ----------------- | ------------------------------------------------------------------------------- |
| `networkId` | `NetworkId!`      | Required — `ROBINHOOD_TESTNET` \| `ROBINHOOD_MAINNET`; networks are never mixed |
| `player`    | `String!`         | 20-byte hex address (normalized to lowercase)                                   |
| `filter`    | `PlayerBetFilter` | Optional `{ status: PENDING \| SETTLED \| CLAIMED }`                            |
| `limit`     | `Int`             | Default 50, clamped to **1–200**                                                |
| `offset`    | `Int`             | ≥ 0; offset pagination against `totalCount`                                     |

### PlayerBetConnection

| Field        | Type            | Notes                                                                                            |
| ------------ | --------------- | ------------------------------------------------------------------------------------------------ |
| `items`      | `[PlayerBet!]!` | The page                                                                                         |
| `totalCount` | `Int!`          | Total rows matching the filter                                                                   |
| `source`     | `String!`       | `indexed`, or `unavailable` when the indexed store isn't configured (empty result, not an error) |

### PlayerBet fields

| Field                                            | Type         | Notes                                                                |
| ------------------------------------------------ | ------------ | -------------------------------------------------------------------- |
| `id`, `betId`, `player`, `affiliate`, `commitId` | —            | Identity; `betId` is a decimal string                                |
| `networkId`                                      | `NetworkId!` | Echoed network                                                       |
| `mode`                                           | `Int!`       | 0 Strike · 1 Range · 2 Ladder                                        |
| `status`                                         | `String!`    | `pending` \| `settled` \| `claimed`                                  |
| `stake`, `liability`, `payout`                   | `String!`    | USDG units as decimal strings                                        |
| `platform`, `game`                               | `String!`    | Attribution from the place call (empty when unset)                   |
| `placedAt`, `settledAt`, `claimedAt`             | `String`     | Timestamps; settle/claim are null until reached                      |
| `claimAsset`                                     | `String`     | `usdg` \| `chance` once claimed                                      |
| `placeTxHash`, `settleTxHash`, `claimTxHash`     | —            | Chain anchors per step                                               |
| `proof`, `entropy`, `commitment`, `clientSeed`   | `String`     | Groth16 call data (never the server seed)                            |
| `proofStatus`                                    | `String`     | `pending` \| `proved` \| `failed` \| `skipped` \| `seed_unavailable` |

## pendingBetCount

```graphql GraphQL theme={"theme":"css-variables"}
query ($player: String!) {
  pendingBetCount(networkId: ROBINHOOD_TESTNET, player: $player)
}
```

Returns `Int!` — the number of indexed, unsettled bets for the wallet on that network. Returns `0` (not an error) when the indexed store is unavailable.
