Skip to main content
Realtime bet updates over Socket.IO. Connect to https://api.chance.money with path /socket.io; no auth — wallet rooms are public (results and proofs are public data; the server seed is never sent).

Events

TypeScript
Invalid subscribe payloads ack { ok: false, error: 'invalid_payload' }. Malformed addresses are silently skipped; accepted addresses are normalized to lowercase.

The update payload

bets:update carries the same shape as betResult: t (bet_placed / bet_result / bet_settled / bet_claimed), status (pending / computed / settled / claimed), amounts as decimal strings, entropy, proof (nullable), transaction hashes, and attribution. Field-by-field semantics: Results & proofs.

Limits and reconnects

  • 50 wallets per socket. Subscribes beyond the cap are dropped (the ack’s wallets array tells you what actually stuck). Need more? Open another socket or rotate subscriptions.
  • Subscriptions don’t survive reconnects. Socket.IO reconnects create a fresh server-side session — always re-emit bets:subscribe in your connect handler, as above.
  • Delivery order isn’t guaranteed. Treat settled / claimed as terminal for a betId and ignore later pending / computed updates for it.
On reconnect, bridge the gap with a betResults batch fetch for any bets that were in flight — socket for liveness, GraphQL for truth-at-a-point.