> ## Documentation Index
> Fetch the complete documentation index at: https://dune-automated-update-duneapi-openapi-files.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# polymarket_polygon.ohlcv_hourly

> Polymarket hourly OHLCV candles per outcome token — markets and Combos — with VWAP, volume, forward-fill, and exact settlement pinning.

export const TableSample = ({tableName, tableSchema}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

The `polymarket_polygon.ohlcv_hourly` table provides hourly OHLCV (Open-High-Low-Close-Volume) candles per Polymarket outcome token — two rows per market or combo, one per side — with VWAP and volume metrics. It covers regular markets **and Combos** (multi-leg parlays) across the full Polygon trading history.

No-trade hours are forward-filled as a **flat bar at the carried close** (volumes zeroed); unresolved markets fill to the current hour.

**A decided series ends on its resolution-hour bar**, and settlement lands on that terminal bar as the hour's final tick: `close` pins to the settlement value — 1/0 per side for any label scheme (via [`market_details.settlement_value`](/data-catalog/curated/prediction-markets/polymarket/market_details)), 0.5 for 50/50 markets, the payout fraction for `partial` combos — `open` keeps the last traded price, and `high`/`low` only widen to include the settlement, so every candle preserves `low <= {open, close} <= high`. Bars with real post-resolution trades stay, with their actual trade OHLC; the forward-filled tail is dropped.

<Note>
  `market_outcome` is **point-in-time per bar**: `unresolved` strictly before the resolution hour, the actual outcome from the resolution-hour bar onward. Historical bars never relabel. `market_details` / `combo_details` remain the authoritative source for a market's *current* state.
</Note>

## Table Schema

| Column              | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `block_month`       | `DATE`      | UTC month partition derived from `hour`                                                                                                                                                                                                                                                                                                                                                    |
| `hour`              | `TIMESTAMP` | UTC hour bucket for the candle                                                                                                                                                                                                                                                                                                                                                             |
| `market_id`         | `VARCHAR`   | ID of the market or combo as a `0x...` string, shared by its two sides: `condition_id` for markets, `combo_condition_id` for combos                                                                                                                                                                                                                                                        |
| `market_name`       | `VARCHAR`   | Market question text; for combos the generated `combo_name`, NULL unless every leg is labeled                                                                                                                                                                                                                                                                                              |
| `outcome`           | `VARCHAR`   | YES or NO token outcome (a combo Yes pays out only if every leg wins)                                                                                                                                                                                                                                                                                                                      |
| `category`          | `VARCHAR`   | Market category tags from market details; NULL for combos                                                                                                                                                                                                                                                                                                                                  |
| `open`              | `DOUBLE`    | First trade price in the hour (0–1 scale). No-trade hours are a flat bar at the carried close. On the resolution-hour bar it keeps the last traded price — settlement pins only the close                                                                                                                                                                                                  |
| `high`              | `DOUBLE`    | Highest trade price in the hour. No-trade hours are a flat bar at the carried close. On the resolution-hour bar, widened to include the settlement value                                                                                                                                                                                                                                   |
| `low`               | `DOUBLE`    | Lowest trade price in the hour. No-trade hours are a flat bar at the carried close. On the resolution-hour bar, widened to include the settlement value                                                                                                                                                                                                                                    |
| `close`             | `DOUBLE`    | Last trade price in the hour (0–1 scale). Carried forward through no-trade hours. On the resolution-hour bar, pinned to the settlement value — the decided price for any label scheme                                                                                                                                                                                                      |
| `vwap`              | `DOUBLE`    | Volume-weighted average price. NULL for forward-filled (no-trade) hours                                                                                                                                                                                                                                                                                                                    |
| `volume_contracts`  | `DOUBLE`    | Total shares traded in the hour. Zero for forward-filled hours                                                                                                                                                                                                                                                                                                                             |
| `volume_usd`        | `DOUBLE`    | Total USD notional volume in the hour. Zero for forward-filled hours                                                                                                                                                                                                                                                                                                                       |
| `trade_count`       | `BIGINT`    | Number of trades in the hour. Zero for forward-filled hours                                                                                                                                                                                                                                                                                                                                |
| `market_end_time`   | `TIMESTAMP` | On-chain resolution time; bounds the fill and drives the settlement pin. `ConditionResolution` block time for markets, the decision time for combos (first lost leg, or last leg resolved); NULL while unresolved. Stamped per row at write — unlike `market_outcome` it is not point-in-time, so rows older than the merge window keep NULL after a later resolution until a full refresh |
| `market_outcome`    | `VARCHAR`   | The market's state **at this hour** (point-in-time): `unresolved` on every bar strictly before the resolution hour, then the actual outcome — `yes`, `no`, `50/50` (markets), `partial` (combos with a 50/50 leg) — from the resolution-hour bar onward, including bars with real post-resolution trades. Immutable per row. NULL only for tokens unknown to both dimensions               |
| `event_market_name` | `VARCHAR`   | Overarching event name for negRisk markets; NULL for combos                                                                                                                                                                                                                                                                                                                                |
| `is_forward_filled` | `BOOLEAN`   | TRUE if this row was generated by forward-fill (no trades in this hour)                                                                                                                                                                                                                                                                                                                    |
| `token_id`          | `UINT256`   | ID of this outcome token: the CTF token ID for markets, the v3 position ID for combos. Joins `market_details`, `combo_details` and positions on `token_id`, and `market_trades` / `combo_trades` on `asset_id`                                                                                                                                                                             |
| `_updated_at`       | `TIMESTAMP` | When this row was last inserted or updated by the dbt pipeline                                                                                                                                                                                                                                                                                                                             |

## Table sample

<TableSample tableSchema="polymarket_polygon" tableName="ohlcv_hourly" />

## Example query

```sql theme={null}
-- Hourly candles for one market's YES side, last 7 days
SELECT
  hour, open, high, low, close, vwap, volume_usd
FROM polymarket_polygon.ohlcv_hourly
WHERE market_name = 'Will X happen by Y date?'
  AND outcome = 'Yes'
  AND hour >= NOW() - INTERVAL '7' DAY
ORDER BY hour
```
