Skip to main content
This page covers subscribing to market lifecycle events with subscribe_market_lifecycle, filtering them by category, and the marketCreated, marketUpdated, and marketResolved payloads that subscription delivers.

Subscribing to market lifecycle events

Subscribe to market lifecycle events by emitting subscribe_market_lifecycle. No authentication required. The server acknowledges with a system message.
marketResolved is also emitted to existing per-market room subscribers automatically (CLOB: market:{slug}, AMM: market:{address}). You don’t need a separate lifecycle subscription to receive resolution events for markets you’re already watching.
To unsubscribe:

Filtering by category

Pass categoryIds to receive only events for markets in those categories:
  • An event is delivered when any ID you pass appears in the event’s categoryIds. You receive each event once, even when several of your IDs match.
  • categoryIds must be an array of at most 32 positive integers. An invalid value is rejected with an error event carrying a message, and your existing lifecycle subscription is left unchanged.
  • Omitting categoryIds, or passing an empty array, subscribes to every lifecycle event.
  • Emitting subscribe_market_lifecycle again replaces your previous filter. It does not add to it.
  • The filter applies to marketCreated, marketUpdated, and the lifecycle copy of marketResolved. Per-market room subscribers still receive marketResolved for markets they watch, whatever the filter.

Event payloads

marketCreated

Emitted when a new market is funded and visible. Hidden markets are excluded.

marketUpdated

Emitted when a sports or esports match’s schedule changes: a new start time or deadline, or a match status such as postponed or cancelled. Each frame carries the current schedule, so you can replace what you hold rather than apply a diff. Only funded, visible markets and groups with a match start time emit it. A market group emits one frame for the whole group; its submarkets do not emit their own. Standalone markets for the same match, such as player props, each emit their own frame.

marketResolved

Emitted when a market resolves to a single winner. Sent to both market_lifecycle subscribers and existing market:{slug} room subscribers.
marketResolved is not emitted for a split resolution, such as a 50-50 resolution, on either the lifecycle stream or the per-market room. Detect splits over REST with GET /markets/{slug}: the market has status: "RESOLVED", winningOutcomeIndex: null, and payoutNumerators with two positive values.
  • WebSocket overview: connection details, handshake authentication, and the full event reference