Skip to main content

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_id uses the condition ID. If it is missing, the Gamma market ID is used.
  • id is generated deterministically from platform_id.
  • Outcomes are sorted reverse-alphabetically before indexes are assigned.
  • Each outcome token ID becomes outcomes.platform_id and is used to generate the outcome UUID.
For a typical Yes/No market, reverse-alphabetical ordering makes Yes outcome 0 and No outcome 1. Read the stored outcome names and indexes instead of assuming source array order.

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, settled outcomePrices 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 under platform = '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.
  • id is generated deterministically from the ticker.
  • Yes is always outcome index 0; No is outcome index 1.
  • 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:
  1. title;
  2. subtitle;
  3. Yes subtitle;
  4. No subtitle;
  5. 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:
  1. void creates zero payouts and resolution_type = 'VOID';
  2. settlement_value_dollars sets the Yes payout directly and No payout to 1 - value;
  3. a Yes/No result creates 1/0 payouts;
  4. a scalar result can be derived by comparing expiration value with the strike;
  5. 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 under platform = '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:
Join fills and orderbook snapshots with markets.id. Use platform_id when you need the venue’s native identifier. See Tables & Schemas for the ClickHouse column types.