Skip to main content
Complete reference for all Probalytics database tables. All tables use a ReplacingMergeTree with indexed_at as the version column. Rows are identified by each table’s ORDER BY key; when identical keys are inserted more than once, the greatest indexed_at wins during background merges.

markets

Primary table containing prediction market metadata from all supported platforms. Availability: All ClickHouse tiers, including all retained market history during trials. See Markets for the distinction between account access and source coverage.
Always filter markets by market_type (and platform). Kalshi combo markets make up over 90% of the table, so a query without a market_type filter scans hundreds of millions of rows even when you only want binary markets. When joining to markets, filter it in a subquery first; a bare JOIN markets loads the whole table into memory.

Schema

Resolution Fields

Indexing Fields

Outcomes Structure

The outcomes column is an array of named tuples:
Access fields by name:

Market Types

Market Statuses


fills

Normalized execution records from supported platform and product feeds. Participant identifiers are populated only when the source exposes them. Availability: All retained fill history on paid ClickHouse tiers; trials normally receive the last 7 days. This is an access entitlement, not a guarantee of complete venue history.

Schema

Indexing Fields

Do not interpret normalized_price without joining market_id to markets and checking market_type. Do not calculate directional P&L by summing the current cash-flow columns: their stored values are not signed by trade direction.

Outcome Structure

The outcome column is a named tuple:
Access fields by name:

Taker Side

taker_side is not directly comparable across every source. In particular, current Kalshi binary fills are stored as BUY; the source side selects the bought Yes/No outcome. Polymarket binary fills use BUY/SELL relative to exchanging quote currency and outcome tokens. See Fills before aggregating by this field.

orderbook_snapshots

Orderbook depth snapshots per market outcome, written when the book state changes. Each row captures the full bid/ask ladder at a point in time. Availability: Orderbook and Custom ClickHouse tiers. Paid credentials receive all retained history; trials normally receive the last 7 days.
Polymarket data is available from November 20, 2025, with high-quality, high-frequency snapshots beginning February 17, 2026; earlier data may have lower capture frequency and gaps. Kalshi orderbook data is available from May 8, 2026. Coverage dates describe observed dataset availability, not a guarantee that every transition is contiguous; use the quality fields below.

Schema

For complete-book semantics, row ordering, quality fields, historical defaults, and venue-specific reconstruction, see Orderbook Snapshots.

Bid/Ask Structure

Each level in the bids and asks arrays is a named tuple:
Access fields by name:

Computed Fields

BBO, spread, and mid-price are not stored — compute them at query time:
  • best_bid = bids[1].price (first level in descending bids)
  • best_ask = asks[1].price (first level in ascending asks)
  • spread = asks[1].price - bids[1].price
  • mid_price = (bids[1].price + asks[1].price) / 2

Example: Bid-Ask Spread Over Time


rfqs

Kalshi request-for-quote lifecycle events. See RFQs for coverage and normalization. Availability: Early access only. Email support@probalytics.io to request access.

Schema


Derived views and wallet tables

These early access datasets are documented on their own pages: Views with a bucket suffix are parameterized: SELECT * FROM ohlc_1m(market_id = '...', start = '...', end = '...').

Table Relationships

Join example:

Ordering & Partitioning

Understanding table ordering helps write efficient queries.

markets

Queries filtering by platform and id align with the sorting key. A created_at filter is still useful for reducing the requested range, but it is not part of the current sort key. market_type is not in the sort key either, but always filter on it: Kalshi PARLAY rows are over 90% of the table, so market_type = 'BINARY' skips most of the data.

fills

  • Queries filtering by platform + market_id are fastest
  • Monthly partitions on timestamp allow efficient date range pruning

orderbook_snapshots

  • Queries filtering by market_id + outcome.id are fastest
  • Daily partitions on timestamp allow efficient date range pruning
  • Preserve path_index when ordering states that share a timestamp

rfqs


Data Types Reference

DateTime64(6) / DateTime64(9)

Microsecond (6) or nanosecond (9) stored precision timestamps in UTC. Precision indicates storage scale, not guaranteed source-clock accuracy.

Decimal128(18) / Decimal64(6)

High-precision decimals for financial values. Decimal128(18) has 18 decimal places (used for fill prices/sizes). Decimal64(6) has 6 decimal places (used for orderbook levels).

Enum Types

Use enum values as strings so queries remain readable and do not depend on internal numeric assignments:

Arrays

Use array functions for filtering and extraction:

Named Tuples

Access tuple fields directly by name: