prediction_markets.ohlcv_hourly table holds hourly price candles (open, high, low, close and volume) for Polymarket and Kalshi markets. Polymarket Combos (multi-leg parlays) are included under the combo’s condition id. The table has one row per (venue, hour, market_id), unique on (venue, block_month, hour, market_id).
Prices are the probability of Yes, between 0 and 1. The probability of No is 1 - close. Volume covers the whole market, with each trade counted once. An hour without trades gets a flat bar at the last price, with zero volume and is_forward_filled = TRUE.
For market names and attributes, join prediction_markets.markets on (venue, market_id). Only category is repeated here, because most queries filter on it.
Settlement. A settled market’s last candle closes at the Yes payout: 1 or 0, 0.5 for a void, or the exact fraction for a scalar market. high and low stretch to include it, and open keeps the last traded price. No flat bars are added after that candle. Candles with real trades after settlement keep their actual prices.
Polymarket has one Yes row per market and hour. When only the No side traded in an hour, the Yes bar is computed as
1 - P(No), with high and low swapped. Combo volume comes from the Yes bar only, because every combo trade is recorded on the Yes token.Table Schema
Table sample
Query performance
The table is partitioned byblock_month. Always filter on block_month or hour.
Example queries
Previous version
Previous version (v1)
Previous version (v1)
Columns of the previous version, for queries that still use it. The migration guide maps each old column to its new name.