The lifecycle channel (Documentation Index
Fetch the complete documentation index at: https://docs.predexon.com/llms.txt
Use this file to discover all available pages before exploring further.
"lifecycle") delivers three event types: condition_prepared, token_registered, and condition_resolution.
V1 vs V2:
condition_prepared fires for both V1 and V2 markets (new market signal from ConditionalTokens). token_registered is V1-only - V2 exchanges no longer emit it. Use condition_prepared as your “new market” signal to cover both. See the V2 Migration Guide.condition_prepared
Emitted when a new condition is created on the sharedConditionalTokens contract. Fires for both V1 and V2 markets.
For binary markets (outcome_slot_count === 2), token IDs are derived deterministically from (condition_id, is_neg_risk) using the CTF Gnosis formula and included in the tokens array. For non-binary markets, tokens is null - query Gamma or CLOB by condition_id to resolve them.
- Metadata fields (
title,market_slug,market_id,image) are alwaysnullat prepare time. tokensis populated for binary markets (outcome_slot_count === 2) with derived token IDs.nullotherwise.- Token labels (
"Yes"/"No") are placeholders - clients should resolve canonical labels via Gamma/CLOB once market metadata is indexed. is_neg_riskis derived from the oracle address (trueif oracle =NegRiskAdapter).outcome_slot_countis the number of outcomes for the condition (typically2).
token_registered
Emitted when a new V1 market’s outcome tokens are registered on-chain. Metadata fields (title, market_slug, etc.) may be null for brand-new markets since off-chain metadata may not yet be available.
condition_resolution
Emitted when a market resolves. Thetokens array includes a won field indicating which outcome won. For voided or non-standard resolutions, the is_invalid field is set to true and all token won fields are false.
is_invalid behavior
When Polymarket resolves a market with a non-standard payout vector (anything other than [0,1] or [1,0]), the event includes is_invalid: true and all token won fields are set to false. This covers voided markets, split resolutions (e.g. 50/50 refunds), and other non-standard outcomes.
| Payout vector | is_invalid | Token won values | Meaning |
|---|---|---|---|
[1, 0] | false | [true, false] | Normal resolution - first token wins |
[0, 1] | false | [false, true] | Normal resolution - second token wins |
[1, 1] | true | [false, false] | Voided/split - 50/50 refund |
[0, 0] | true | [false, false] | Invalid resolution |
| Any other | true | [false, false] | Non-standard payout |
Field Reference
| Field | Type | Description |
|---|---|---|
event_type | "condition_prepared" | "token_registered" | "condition_resolution" | |
condition_id | string | Market condition ID |
oracle | string | null | Oracle address (resolution only) |
question_id | string | null | Question ID (resolution only) |
is_neg_risk | boolean | Whether this is a neg-risk market |
is_invalid | boolean | true when the market resolved with a non-standard payout (resolution only) |
tokens | array | null | Outcome tokens; includes won boolean on resolution events |
title | string | null | Market title |
market_slug | string | null | Market URL slug |
market_id | string | null | Internal market ID |
image | string | null | Market image URL |
tx_hash | string | Transaction hash |
log_index | string | Log index (hex) |
block_number | string | Block number (hex) |
timestamp | number | Unix timestamp in seconds |
outcome_slot_count | number | null | Number of outcomes (present on condition_prepared only) |
version | number | null | 1 for V1 contracts, 2 for V2 contracts |
