Shape
markets has one row per normalized market or instrument. Updates reuse the same id; in ClickHouse, indexed_at selects the newest version.
Coverage by venue and product
Counts as of 2026-08-24 17:34 UTC, queried from
markets FINAL and grouped by platform and market_type. Coverage starts use the earliest created_at; perpetual and margin rows currently use fixed product reference epochs.
Markets are indexed continuously, so these counts change throughout the day. Query the data warehouse for current values:
Polymarket prediction markets
Source
Market and event metadata comes from Gamma. This supplies the question, description, URL slugs, lifecycle dates, outcome names, outcome token IDs, and settled outcome prices.Identity and outcomes
platform_iduses the condition ID. If it is missing, the Gamma market ID is used.idis generated deterministically fromplatform_id.- Outcomes are sorted reverse-alphabetically before indexes are assigned.
- Each outcome token ID becomes
outcomes.platform_idand is used to generate the outcome UUID.
Status mapping
Rules are evaluated from top to bottom:Lifecycle mapping
Resolution mapping
Gamma does not expose one normalized winner field. For a closed market, settledoutcomePrices become payout values:
These rows come from Gamma rather than market-creation chain events, so
source_block_number is normally 0 and source_tx_hash is normally empty.
Polymarket perpetuals
Polymarket perpetual instruments use a separate product feed and remain underplatform = 'POLYMARKET'.
The source also provides base/quote assets, funding interval, and price/quantity decimal metadata. Those attributes are used internally but are not currently columns in the public
markets table.
Kalshi prediction markets
Source
Kalshi market records are enriched with event and series metadata. The result combines the market ticker and rules with the related series title, category, and URL structure.Identity and outcomes
- The venue ticker becomes
platform_id. idis generated deterministically from the ticker.Yesis always outcome index0;Nois outcome index1.- Outcome UUIDs are generated deterministically from the market UUID and normalized side name.
Display-field fallbacks
title uses the first non-empty value in this order:
- title;
- subtitle;
- Yes subtitle;
- No subtitle;
- ticker.
description joins primary and secondary rules. slug comes from the series title, and the market URL is constructed from the series and market tickers.
Type mapping
Status mapping
Lifecycle mapping
Resolution mapping
Resolution uses the most precise available source field:voidcreates zero payouts andresolution_type = 'VOID';settlement_value_dollarssets the Yes payout directly and No payout to1 - value;- a Yes/No result creates
1/0payouts; - a scalar result can be derived by comparing expiration value with the strike;
- if the required scalar inputs are missing, payout data remains empty.
resolution_resolved_at uses settlement time when present, otherwise expiration time. resolution_resolved_by is kalshi.
Kalshi margin instruments
Kalshi margin instruments use a separate product feed and remain underplatform = 'KALSHI'.
Margin status mapping:
The source contract size, tick size, and fractional-trading flag are used internally but are not currently columns in the public
markets table.
Querying the latest market version
ClickHouse replaces rows by(platform, id) and keeps the greatest indexed_at during background merges. Use FINAL when a query must see exactly one current version per market:
markets.id. Use platform_id when you need the venue’s native identifier.
See Tables & Schemas for the ClickHouse column types.