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

# History

> playerBets and pendingBetCount — paginated wallet history with status filters.

The API indexes the full bet lifecycle, so wallet history is one GraphQL query — no log scanning.

## List a wallet's bets

```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
      payout
      claimAsset
      placedAt
      settledAt
      claimedAt
      placeTxHash
    }
  }
}
```

### Arguments

| Arg             | Type              | Notes                                                  |
| --------------- | ----------------- | ------------------------------------------------------ |
| `networkId`     | `NetworkId!`      | Required — testnet and mainnet history are never mixed |
| `player`        | `String!`         | Wallet address (0x + 40 hex chars)                     |
| `filter.status` | `PlayerBetStatus` | Optional: `PENDING`, `SETTLED`, or `CLAIMED`           |
| `limit`         | `Int`             | Default 50, clamped to 1–200                           |
| `offset`        | `Int`             | Offset pagination; use with `totalCount`               |

### Response

`PlayerBetConnection` returns `items`, `totalCount` (for pagination), and `source` — `indexed` when served from the indexer, `unavailable` when the indexed store is not configured (you get an empty list, not an error).

Each `PlayerBet` carries the full lifecycle: identity (`betId`, `player`, `mode`, `commitId`), amounts (`stake`, `liability`, `payout` — decimal strings in USDG units), status timestamps, per-step transaction hashes, attribution (`platform`, `game`), and the proof bundle (`proof`, `entropy`, `commitment`, `clientSeed`, `proofStatus`). Full field reference: [GraphQL — playerBets](/api-reference/player-bets).

## Count pending bets

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

Returns the number of indexed, unsettled bets for the wallet — useful for a "you have unresolved bets" badge without fetching pages.

<Tip>
  For a claim back-fill (user returns after being offline), combine `playerBets(filter: { status: SETTLED })` with the batch [`betResults`](/api-reference/bet-result) query to fetch proofs for anything still unclaimed, then offer a single [`claimBets`](/integrate/claiming) transaction.
</Tip>
