Skip to navigation

Token or market subscription

View as Markdown

This scenario selects permitted outcome or market events across owners. It requires suitable market access; an owner-allowlist key may not permit it.

Token selector

This complete subscribe template uses synthetic token "7". Replace it with a permitted token ID, preserving its exact decimal string.

{
"version": 1,
"kind": "subscribe",
"requestId": "request-token-1",
"consumerId": "market-consumer-1",
"subscriptionId": "token-1",
"filters": {
"tokenIds": ["7"],
"stages": ["included", "canonicality"]
},
"start": {"mode": "live_cut"}
}

Expect subscribed, zero or more matching batches, a checkpoint, then caught_up at the cut. Save the complete page and token before ACK. The selector still delivers on-chain lifecycle data, not a CLOB orderbook or trading API.

Condition or slug

Use conditionIds or marketSlugs when a known catalog binding exists. The accepted response contains selected frozen snapshots. Unknown slug or missing condition binding is a filter error; do not infer a mapping from a similar name.

Token, condition and slug groups combine with AND. For market A or market B, use multiple values within a single facet. Incompatible groups can produce no trade matches while checkpoints and relevant quality notices continue.

Catalog refresh

An issued cursor retains its frozen meaning. Select a new mapping through explicit rebind within the allowed scope and save the new generation/snapshot. Resume uses the stored mapping, not the current catalog.

For volume, avoid summing maker/taker perspectives: see amounts. Exact mapping fields are in frames.

Complete synthetic frozen-catalog response

This complete subscribed frame comes from a deterministic software fixture using the actual frozen catalog resolver and server serializer. market-one, market ID 10, condition/token bindings, publication metadata and connection positions are synthetic test values, not a live market or subscription. It does not demonstrate authentication or validate a real cursor MAC.

Both frozenMarkets and frozenConditions use the same snapshot shape. Their version is the catalog wire version, distinct from the top-level frame version; revisions and token IDs are decimal strings, while network chain_id and both version fields are JSON numbers. The example source-quality state is fixture data, not a current health claim.

{
"cutPosition": "2",
"filterHash": "0x0202020202020202020202020202020202020202020202020202020202020202",
"filterPolicyVersion": "1",
"frameSequence": "2",
"frozenConditions": {
"markets": [
{
"conditionId": "0x0101010101010101010101010101010101010101010101010101010101010101",
"mappingRevision": "1",
"marketId": "10",
"slug": "market-one",
"tokenIds": [
"7",
"8"
]
}
],
"network": {
"chain_id": 137,
"genesis_hash": "0xa9c28ce2141b56c474f1dc504bee9b01eb1bd7d1a507580d5519d4437a97de1b",
"namespace": "eip155"
},
"publication": {
"generation": "11111111-1111-4111-8111-111111111111",
"manifestAlgorithm": "sha256-v1",
"manifestHash": "0x0707070707070707070707070707070707070707070707070707070707070707",
"publishedAt": "2026-09-27T00:00:00Z",
"revision": "1"
},
"version": 1
},
"frozenMarkets": {
"markets": [
{
"conditionId": "0x0101010101010101010101010101010101010101010101010101010101010101",
"mappingRevision": "1",
"marketId": "10",
"slug": "market-one",
"tokenIds": [
"7",
"8"
]
}
],
"network": {
"chain_id": 137,
"genesis_hash": "0xa9c28ce2141b56c474f1dc504bee9b01eb1bd7d1a507580d5519d4437a97de1b",
"namespace": "eip155"
},
"publication": {
"generation": "11111111-1111-4111-8111-111111111111",
"manifestAlgorithm": "sha256-v1",
"manifestHash": "0x0707070707070707070707070707070707070707070707070707070707070707",
"publishedAt": "2026-09-27T00:00:00Z",
"revision": "1"
},
"version": 1
},
"generation": "2",
"kind": "subscribed",
"sourceQuality": [
{
"capability": "unknown",
"contractScope": "ctf-exchange-v2",
"lastPosition": null,
"network": "polygon:137",
"sourceScope": "polygon.pending"
}
],
"startPosition": "1",
"subscriptionId": "market-1",
"version": 1
}