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

# Overview

> Public Chance API — one GraphQL endpoint and one Socket.IO channel, no auth.

The public API is small by design: one GraphQL endpoint for discovery, results, and history, plus a Socket.IO channel for realtime bet updates.

| Surface      | Base                                                                     |
| ------------ | ------------------------------------------------------------------------ |
| GraphQL      | `POST https://api.chance.money/graphql`                                  |
| Health probe | `GET https://api.chance.money/health` (same shape as the `health` query) |
| Socket.IO    | `https://api.chance.money`, path `/socket.io`                            |

All surfaces documented here are **unauthenticated** — no API keys, no sessions.

## GraphQL queries

| Query                                                          | Purpose                                            |
| -------------------------------------------------------------- | -------------------------------------------------- |
| [`networkConfigs`](/api-reference/network-configs)             | Chain ids and contract addresses per network       |
| [`betResult` / `betResults`](/api-reference/bet-result)        | Result + Groth16 proof for one or many bets        |
| [`playerBets` / `pendingBetCount`](/api-reference/player-bets) | Indexed wallet history with filters and pagination |
| [`health`](/api-reference/health)                              | Liveness                                           |

## Socket.IO events

| Event                                 | Direction                                |
| ------------------------------------- | ---------------------------------------- |
| `bets:subscribe` / `bets:unsubscribe` | client → server                          |
| `bets:subscribed`                     | server → client (subscription state ack) |
| `bets:update`                         | server → client (bet lifecycle payloads) |

Full contracts: [Socket.IO — bets](/api-reference/socket-bets). Error codes and rate limits: [Errors & limits](/api-reference/errors-and-limits).

<Note>
  Conventions across all payloads: on-chain integers (stakes, payouts, bet ids) are **decimal strings**; addresses are lowercase hex; the server seed is never exposed on any surface.
</Note>
