Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dune.com/llms.txt

Use this file to discover all available pages before exploring further.

The prediction_markets.ohlcv_hourly table provides hourly OHLCV bars across Polymarket and Kalshi. Grain: one row per (venue, hour, market_id, outcome). Prices are in probability space [0, 1]. Polymarket emits Yes and No bars; Kalshi emits Yes only (No can be derived as 1 - Yes). Hours without trades carry the previous close forward and are flagged via is_forward_filled. Resolved markets are pinned to 1.0 / 0.0 after expiration.

Table Schema

ColumnTypeDescription
venueVARCHARpolymarket or kalshi
block_monthDATEFirst day of the calendar month of hour (partition key)
hourTIMESTAMPBar timestamp, truncated to the hour
market_idVARCHARPolymarket condition_id / Kalshi ticker
outcomeVARCHAROutcome side this bar represents
market_nameVARCHARMarket title (denormalized)
categoryVARCHARUnified category enum
category_nativeVARCHAROriginal upstream category value
openDOUBLEOpening probability of the bar, in [0, 1]
highDOUBLEBar high, in [0, 1]
lowDOUBLEBar low, in [0, 1]
closeDOUBLEClosing probability of the bar, in [0, 1]
vwapDOUBLEVolume-weighted average price for the bar. NULL when no trades
volume_contractsDOUBLETotal contracts traded in the hour
volume_usdDOUBLETotal USD notional traded in the hour
volume_usd_yesDOUBLEUSD notional traded on the Yes side
volume_usd_noDOUBLEUSD notional traded on the No side. NULL for Kalshi (Yes-only)
trade_countBIGINTNumber of fills in the hour
market_end_timeTIMESTAMPMarket expiration time (denormalized)
market_outcomeVARCHARResolved outcome (denormalized). NULL while unresolved
event_market_nameVARCHAREvent group label (denormalized)
is_forward_filledBOOLEANTRUE when the bar has no trades and was carried forward
_updated_atTIMESTAMPWhen this row was last written by the pipeline

Table sample

Query performance

block_month is the partition key. Always include a block_month or hour filter.

Example query

-- Daily VWAP across both venues for a single category, last 30 days
SELECT
  venue,
  DATE_TRUNC('day', hour) AS day,
  AVG(vwap) AS avg_daily_vwap,
  SUM(volume_usd) AS volume_usd
FROM prediction_markets.ohlcv_hourly
WHERE hour >= NOW() - INTERVAL '30' DAY
  AND category = 'politics'
  AND vwap IS NOT NULL
GROUP BY 1, 2
ORDER BY 1, 2