Subscribe to market creation, schedule, and resolution events, optionally filtered by category, and read the marketCreated, marketUpdated, and marketResolved payloads
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.
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.
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.
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 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
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Limitless Exchange","colors":{"primary":"#9AB83A","light":"#DCF58C","dark":"#7A9A1E"},"logo":{"light":"https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max\u0026auto=format\u0026n=r7gW3TwphUtCZ8zM\u0026q=85\u0026s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b","dark":"https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/dark.svg?fit=max\u0026auto=format\u0026n=r7gW3TwphUtCZ8zM\u0026q=85\u0026s=6500e01609e582f758db1a9610b63bd8"},"favicon":"https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/favicon.svg?fit=max\u0026auto=format\u0026n=r7gW3TwphUtCZ8zM\u0026q=85\u0026s=345f02206803d94b3b1911d2a80bf9c3","api":{"playground":{}},"navbar":{"links":[{"href":"mailto:help@limitless.network","label":"Support"}]},"footer":{"socials":{"x":"https://x.com/trylimitless","discord":"https://discord.com/invite/yb4SscD8RZ"}},"seo":{"metatags":{"twitter:card":"summary_large_image"}},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Limitless Exchange","icon":"arrow-up-right-from-square","href":"https://limitless.exchange"},{"anchor":"Builders Chat","icon":"telegram","href":"https://t.me/LimitlessBuildersChat"},{"anchor":"Discord","icon":"discord","href":"https://discord.com/invite/yb4SscD8RZ"},{"anchor":"Twitter","icon":"x-twitter","href":"https://x.com/trylimitless"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"limitless","hasAudioNarration":false,"actualSubdomain":"limitless","customDomains":["docs.limitless.exchange"],"gitSource":{"type":"github","owner":"limitless-labs-group","repo":"limitless-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ae2027fd6a250fd1db9a4f3","clientVersion":"0.0.4124","searchFilterCounts":[{"language":"default","tag":"API Reference","count":81},{"language":"default","tag":"For Developers","count":67},{"language":"default","tag":"User Guide","count":26},{"language":"default","tag":"Portfolio","count":14},{"language":"default","tag":"Trading","count":14},{"language":"default","tag":"Getting Started","count":14},{"language":"default","tag":"Go SDK","count":11},{"language":"default","tag":"Python SDK","count":11},{"language":"default","tag":"Rust SDK","count":11},{"language":"default","tag":"TypeScript SDK","count":11}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"developers/websocket/market-lifecycle","slug":"/developers/websocket/market-lifecycle","pageMetadata":{"title":"Market Lifecycle","description":"Subscribe to market creation, schedule, and resolution events, optionally filtered by category, and read the marketCreated, marketUpdated, and marketResolved payloads","href":"/developers/websocket/market-lifecycle"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Subscribe to market creation, schedule, and resolution events, optionally filtered by category, and read the marketCreated, marketUpdated, and marketResolved payloads\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This page covers subscribing to market lifecycle events with `,_jsx(_components.code,{children:`subscribe_market_lifecycle`}),`, filtering them by category, and the `,_jsx(_components.code,{children:`marketCreated`}),`, `,_jsx(_components.code,{children:`marketUpdated`}),`, and `,_jsx(_components.code,{children:`marketResolved`}),` payloads that subscription delivers.`]}),`\n`,_jsx(Heading,{level:`2`,id:`subscribing-to-market-lifecycle-events`,children:`Subscribing to market lifecycle events`}),`\n`,_jsxs(_components.p,{children:[`Subscribe to market lifecycle events by emitting `,_jsx(_components.code,{children:`subscribe_market_lifecycle`}),`. No authentication required. The server acknowledges with a `,_jsx(_components.code,{children:`system`}),` message.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`socket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'connect'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` socket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`emit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'subscribe_market_lifecycle'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`socket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'marketCreated'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'New market:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`slug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`title`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`socket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'marketUpdated'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Schedule changed:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`slug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`startMatchTimestampInUTC`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`matchStatus`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`socket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'marketResolved'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Market resolved:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`slug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`winningOutcome`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`marketResolved`}),` is also emitted to existing per-market room subscribers automatically (CLOB: `,_jsx(_components.code,{children:`market:{slug}`}),`, AMM: `,_jsx(_components.code,{children:`market:{address}`}),`). You don’t need a separate lifecycle subscription to receive resolution events for markets you’re already watching.`]})}),`\n`,_jsx(_components.p,{children:`To unsubscribe:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`socket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`emit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'unsubscribe_market_lifecycle'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`filtering-by-category`,children:`Filtering by category`}),`\n`,_jsxs(_components.p,{children:[`Pass `,_jsx(_components.code,{children:`categoryIds`}),` to receive only events for markets in those categories:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`socket`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`emit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'subscribe_market_lifecycle'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`categoryIds:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`49`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] });`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`An event is delivered when any ID you pass appears in the event’s `,_jsx(_components.code,{children:`categoryIds`}),`. You receive each event once, even when several of your IDs match.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`categoryIds`}),` must be an array of at most 32 positive integers. An invalid value is rejected with an `,_jsx(_components.code,{children:`error`}),` event carrying a `,_jsx(_components.code,{children:`message`}),`, and your existing lifecycle subscription is left unchanged.`]}),`\n`,_jsxs(_components.li,{children:[`Omitting `,_jsx(_components.code,{children:`categoryIds`}),`, or passing an empty array, subscribes to every lifecycle event.`]}),`\n`,_jsxs(_components.li,{children:[`Emitting `,_jsx(_components.code,{children:`subscribe_market_lifecycle`}),` again replaces your previous filter. It does not add to it.`]}),`\n`,_jsxs(_components.li,{children:[`The filter applies to `,_jsx(_components.code,{children:`marketCreated`}),`, `,_jsx(_components.code,{children:`marketUpdated`}),`, and the lifecycle copy of `,_jsx(_components.code,{children:`marketResolved`}),`. Per-market room subscribers still receive `,_jsx(_components.code,{children:`marketResolved`}),` for markets they watch, whatever the filter.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`event-payloads`,children:`Event payloads`}),`\n`,_jsx(Heading,{level:`3`,id:`marketcreated`,children:_jsx(_components.code,{children:`marketCreated`})}),`\n`,_jsx(_components.p,{children:`Emitted when a new market is funded and visible. Hidden markets are excluded.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"slug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"btc-above-110k-apr-2026\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$BTC above $110,000 on Apr 5, 2026?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CLOB\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"categoryIds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-04-02T12:00:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`slug`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Market slug identifier`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`title`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Market title`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`'AMM' | 'CLOB'`})}),_jsx(_components.td,{children:`Market type`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`groupSlug`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string?`})}),_jsxs(_components.td,{children:[`Present only when the event is for a market group; then `,_jsx(_components.code,{children:`groupSlug`}),` equals `,_jsx(_components.code,{children:`slug`}),`. Submarkets do not emit their own `,_jsx(_components.code,{children:`marketCreated`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`categoryIds`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`number[]`})}),_jsx(_components.td,{children:`Category IDs (always present, may be empty)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`createdAt`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`ISO-8601 creation timestamp`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`marketupdated`,children:_jsx(_components.code,{children:`marketUpdated`})}),`\n`,_jsx(_components.p,{children:`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.`}),`\n`,_jsx(_components.p,{children:`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.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"slug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"arsenal-vs-chelsea-oct-18-2026\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"groupSlug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"arsenal-vs-chelsea-oct-18-2026\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CLOB\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"matchStatus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"RESCHEDULED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"categoryIds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`49`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"deadline\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-18T16:00:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startMatchTimestampInUTC\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1792339200`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`slug`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Market or group slug`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`groupSlug`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string?`})}),_jsxs(_components.td,{children:[`Present only when the event is for a market group; then `,_jsx(_components.code,{children:`groupSlug`}),` equals `,_jsx(_components.code,{children:`slug`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`'AMM' | 'CLOB'`})}),_jsxs(_components.td,{children:[`Market type. Always `,_jsx(_components.code,{children:`CLOB`}),` for groups.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`matchStatus`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`'POSTPONED' | 'RESCHEDULED' | 'CANCELLED' | 'ABANDONED' | null`})}),_jsxs(_components.td,{children:[`Match status from the data provider, or `,_jsx(_components.code,{children:`null`}),` when there is none`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`categoryIds`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`number[]`})}),_jsx(_components.td,{children:`Category IDs (always present, may be empty)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`deadline`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string | null`})}),_jsx(_components.td,{children:`ISO-8601 market deadline`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`startMatchTimestampInUTC`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsx(_components.td,{children:`Match start time as a Unix timestamp in seconds`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`marketresolved`,children:_jsx(_components.code,{children:`marketResolved`})}),`\n`,_jsxs(_components.p,{children:[`Emitted when a market resolves to a single winner. Sent to both `,_jsx(_components.code,{children:`market_lifecycle`}),` subscribers and existing `,_jsx(_components.code,{children:`market:{slug}`}),` room subscribers.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"slug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"btc-above-110k-apr-2026\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CLOB\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"winningOutcome\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YES\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"winningIndex\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"resolutionDate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-04-05T14:00:00.000Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`slug`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`Market slug identifier`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`'AMM' | 'CLOB'`})}),_jsx(_components.td,{children:`Market type`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`winningOutcome`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`'YES' | 'NO'`})}),_jsx(_components.td,{children:`The winning outcome`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`winningIndex`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0 | 1`})}),_jsx(_components.td,{children:`Index of the winning outcome (0 = YES, 1 = NO)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`resolutionDate`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`ISO-8601 resolution timestamp`})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`marketResolved`}),` is not emitted for a split resolution, such as a `,_jsx(_components.a,{href:`/user-guide/market-resolution#50-50-resolution`,children:`50-50 resolution`}),`, on either the lifecycle stream or the per-market room. Detect splits over REST with `,_jsx(_components.a,{href:`/api-reference/markets/get-market`,children:_jsx(_components.code,{children:`GET /markets/{slug}`})}),`: the market has `,_jsx(_components.code,{children:`status: \"RESOLVED\"`}),`, `,_jsx(_components.code,{children:`winningOutcomeIndex: null`}),`, and `,_jsx(_components.code,{children:`payoutNumerators`}),` with two positive values.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`related`,children:`Related`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/developers/websocket/overview`,children:`WebSocket overview`}),`: connection details, handshake authentication, and the full event reference`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Market Lifecycle","description":"Subscribe to market creation, schedule, and resolution events, optionally filtered by category, and read the marketCreated, marketUpdated, and marketResolved payloads","href":"/developers/websocket/market-lifecycle"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Subscribing to market lifecycle events","slug":"subscribing-to-market-lifecycle-events","depth":2,"children":[{"title":"Filtering by category","slug":"filtering-by-category","depth":3,"children":[]}]},{"title":"Event payloads","slug":"event-payloads","depth":2,"children":[{"title":"marketCreated","slug":"marketcreated","depth":3,"children":[]},{"title":"marketUpdated","slug":"marketupdated","depth":3,"children":[]},{"title":"marketResolved","slug":"marketresolved","depth":3,"children":[]}]},{"title":"Related","slug":"related","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"limitless","siteName":"Limitless Exchange","title":"Market Lifecycle - Limitless Exchange","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-16T05:09:28.946Z","originalFileLocation":"developers/websocket/market-lifecycle.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Subscribe to market creation, schedule, and resolution events, optionally filtered by category, and read the marketCreated, marketUpdated, and marketResolved payloads\">\u003cmeta data-mint-head name=\"application-name\" content=\"Limitless Exchange\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Market Lifecycle - Limitless Exchange\">\u003cmeta data-mint-head property=\"og:description\" content=\"Subscribe to market creation, schedule, and resolution events, optionally filtered by category, and read the marketCreated, marketUpdated, and marketResolved payloads\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Limitless Exchange\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.limitless.exchange/developers/websocket/market-lifecycle\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://limitless.mintlify.site/_mintlify/api/og/v2?division=WebSocket\u0026amp;title=Market+Lifecycle\u0026amp;description=Subscribe+to+market+creation%2C+schedule%2C+and+resolution+events%2C+optionally+filtered+by+category%2C+and+read+the+marketCreated%2C+marketUpdated%2C+and+marketResolved+pa\u0026amp;theme=888cee6df57f640d9a30d0c6\u0026amp;signature=fff146d94644a30e29012aeb965e14587f3c8c0029f7ce770dce492e69499168\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Market Lifecycle - Limitless Exchange\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Subscribe to market creation, schedule, and resolution events, optionally filtered by category, and read the marketCreated, marketUpdated, and marketResolved payloads\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://limitless.mintlify.site/_mintlify/api/og/v2?division=WebSocket\u0026amp;title=Market+Lifecycle\u0026amp;description=Subscribe+to+market+creation%2C+schedule%2C+and+resolution+events%2C+optionally+filtered+by+category%2C+and+read+the+marketCreated%2C+marketUpdated%2C+and+marketResolved+pa\u0026amp;theme=888cee6df57f640d9a30d0c6\u0026amp;signature=fff146d94644a30e29012aeb965e14587f3c8c0029f7ce770dce492e69499168\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/limitless/eKG_O-mKVQpNZHIN/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Limitless Exchange\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9AB83A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.limitless.exchange/developers/websocket/market-lifecycle\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/developers/websocket/market-lifecycle.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.limitless.exchange/#organization\",\"name\":\"Limitless Exchange\",\"url\":\"https://docs.limitless.exchange\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/limitless/r7gW3TwphUtCZ8zM/logo/light.svg?fit=max\u0026auto=format\u0026n=r7gW3TwphUtCZ8zM\u0026q=85\u0026s=0d6f32ed5e8a1f35ba9d1fa2e0b57a4b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.limitless.exchange#website\",\"name\":\"Limitless Exchange\",\"url\":\"https://docs.limitless.exchange\",\"publisher\":{\"@id\":\"https://docs.limitless.exchange/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.limitless.exchange/developers/websocket/market-lifecycle#webpage\",\"url\":\"https://docs.limitless.exchange/developers/websocket/market-lifecycle\",\"name\":\"Market Lifecycle\",\"description\":\"Subscribe to market creation, schedule, and resolution events, optionally filtered by category, and read the marketCreated, marketUpdated, and marketResolved payloads\",\"dateModified\":\"2026-10-16T05:09:28.946Z\",\"isPartOf\":{\"@id\":\"https://docs.limitless.exchange#website\"},\"breadcrumb\":{\"@id\":\"https://docs.limitless.exchange/developers/websocket/market-lifecycle#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.limitless.exchange/developers/websocket/market-lifecycle#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"WebSocket\",\"item\":\"https://docs.limitless.exchange/developers/websocket/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Market Lifecycle\",\"item\":\"https://docs.limitless.exchange/developers/websocket/market-lifecycle\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.limitless.exchange/developers/websocket/market-lifecycle#article\",\"headline\":\"Market Lifecycle\",\"name\":\"Market Lifecycle\",\"description\":\"Subscribe to market creation, schedule, and resolution events, optionally filtered by category, and read the marketCreated, marketUpdated, and marketResolved payloads\",\"url\":\"https://docs.limitless.exchange/developers/websocket/market-lifecycle\",\"mainEntityOfPage\":{\"@id\":\"https://docs.limitless.exchange/developers/websocket/market-lifecycle#webpage\"},\"dateModified\":\"2026-10-16T05:09:28.946Z\",\"publisher\":{\"@id\":\"https://docs.limitless.exchange/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.limitless.exchange#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Limitless Exchange\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Limitless Exchange\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/developers/websocket/market-lifecycle.md","siteName":"Limitless Exchange","nav":{"global":{"anchors":[{"anchor":"Limitless Exchange","icon":"arrow-up-right-from-square","href":"https://limitless.exchange"},{"anchor":"Builders Chat","icon":"telegram","href":"https://t.me/LimitlessBuildersChat"},{"anchor":"Discord","icon":"discord","href":"https://discord.com/invite/yb4SscD8RZ"},{"anchor":"Twitter","icon":"x-twitter","href":"https://x.com/trylimitless"}]},"tabs":[{"tab":"User Guide","pages":[{"title":"User Guide","href":""}]},{"tab":"For Developers","groups":[{"group":"Getting Started","pages":[{"title":"For Developers","href":"/developers/introduction"},{"title":"Migrate from Polymarket","sidebarTitle":"From Polymarket","href":"/developers/migrate-from-polymarket"},{"title":"Migrate to the new trading venues","sidebarTitle":"New trading venues","href":"/developers/migrate-to-new-trading-venues"},{"title":"Authentication","href":"/developers/authentication"},{"title":"Programmatic API","href":"/developers/programmatic-api"},{"title":"Partner Curated Packs","href":"/developers/partner-packs"},{"title":"Maintenance Mode","href":"/developers/maintenance-mode"},{"title":"Venue System","href":"/developers/venue-system"},{"title":"EIP-712 Order Signing","href":"/developers/eip712-signing"},{"title":"Build a Trading Agent","href":"/developers/build-a-trading-agent"},{"title":"MCP Server","href":"/developers/mcp-server"},{"title":"Building Responsible Trading Agents","href":"/developers/responsible-agents"},{"title":"Cross-Market Market Making","sidebarTitle":"Cross-market MM","href":"/developers/cross-market-market-making"},{"title":"AMM Trading (Server Wallets)","href":"/developers/amm-trading"}]},{"group":"Quick Start","pages":[{"title":"Python Quick Start","href":"/developers/quickstart/python"},{"title":"Node.js / TypeScript Quick Start","href":"/developers/quickstart/nodejs"},{"title":"WebSocket Integration","href":"/developers/quickstart/websocket"}]},{"group":"TypeScript SDK","pages":[{"title":"TypeScript SDK","href":"/developers/sdk/typescript/getting-started"},{"title":"Markets","href":"/developers/sdk/typescript/markets"},{"title":"Market Pages","href":"/developers/sdk/typescript/market-pages"},{"title":"Trading \u0026 Orders","href":"/developers/sdk/typescript/orders"},{"title":"Portfolio \u0026 Positions","href":"/developers/sdk/typescript/portfolio"},{"title":"API Tokens","href":"/developers/sdk/typescript/api-tokens"},{"title":"Partner Accounts","href":"/developers/sdk/typescript/partner-accounts"},{"title":"Curated Packs","href":"/developers/sdk/typescript/packs"},{"title":"Delegated Orders","href":"/developers/sdk/typescript/delegated-orders"},{"title":"WebSocket Streaming","href":"/developers/sdk/typescript/websocket"},{"title":"Error Handling \u0026 Retry","href":"/developers/sdk/typescript/error-handling"}]},{"group":"Python SDK","pages":[{"title":"Python SDK","href":"/developers/sdk/python/getting-started"},{"title":"Markets","href":"/developers/sdk/python/markets"},{"title":"Market Pages","href":"/developers/sdk/python/market-pages"},{"title":"Trading \u0026 Orders","href":"/developers/sdk/python/orders"},{"title":"Portfolio \u0026 Positions","href":"/developers/sdk/python/portfolio"},{"title":"API Tokens","href":"/developers/sdk/python/api-tokens"},{"title":"Partner Accounts","href":"/developers/sdk/python/partner-accounts"},{"title":"Curated Packs","href":"/developers/sdk/python/packs"},{"title":"Delegated Orders","href":"/developers/sdk/python/delegated-orders"},{"title":"WebSocket Streaming","href":"/developers/sdk/python/websocket"},{"title":"Error Handling \u0026 Retry","href":"/developers/sdk/python/error-handling"}]},{"group":"Go SDK","pages":[{"title":"Go SDK","href":"/developers/sdk/go/getting-started"},{"title":"Markets","href":"/developers/sdk/go/markets"},{"title":"Market Pages","href":"/developers/sdk/go/market-pages"},{"title":"Trading \u0026 Orders","href":"/developers/sdk/go/orders"},{"title":"Portfolio \u0026 Positions","href":"/developers/sdk/go/portfolio"},{"title":"API Tokens","href":"/developers/sdk/go/api-tokens"},{"title":"Partner Accounts","href":"/developers/sdk/go/partner-accounts"},{"title":"Curated Packs","href":"/developers/sdk/go/packs"},{"title":"Delegated Orders","href":"/developers/sdk/go/delegated-orders"},{"title":"WebSocket Streaming","href":"/developers/sdk/go/websocket"},{"title":"Error Handling \u0026 Retry","href":"/developers/sdk/go/error-handling"}]},{"group":"Rust SDK","pages":[{"title":"Rust SDK","href":"/developers/sdk/rust/getting-started"},{"title":"Markets","href":"/developers/sdk/rust/markets"},{"title":"Market Pages","href":"/developers/sdk/rust/market-pages"},{"title":"Trading \u0026 Orders","href":"/developers/sdk/rust/orders"},{"title":"Portfolio \u0026 Positions","href":"/developers/sdk/rust/portfolio"},{"title":"API Tokens","href":"/developers/sdk/rust/api-tokens"},{"title":"Partner Accounts","href":"/developers/sdk/rust/partner-accounts"},{"title":"Curated Packs","href":"/developers/sdk/rust/packs"},{"title":"Delegated Orders","href":"/developers/sdk/rust/delegated-orders"},{"title":"WebSocket Streaming","href":"/developers/sdk/rust/websocket"},{"title":"Error Handling \u0026 Retry","href":"/developers/sdk/rust/error-handling"}]},{"group":"WebSocket","pages":[{"title":"WebSocket Overview","href":"/developers/websocket/overview"},{"title":"Market Data","href":"/developers/websocket/market-data"},{"title":"Positions","href":"/developers/websocket/positions"},{"title":"Order Events","description":"Subscribe to OME and settlement events for your CLOB orders and read the orderEvent payloads","href":"/developers/websocket/order-events"},{"title":"Market Lifecycle","href":"/developers/websocket/market-lifecycle"},{"title":"Unrealized PnL","description":"Subscribe to Unrealized PnL leaderboard invalidation hints and read the unrealizedPnlProjectionChanged payload","href":"/developers/websocket/unrealized-pnl"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Market Lifecycle - Limitless Exchange","buildId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","deploymentId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","dynamics":[],"chunks":[]}