> ## 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.

# Migrating to v2

> What changes in the v2 prediction market tables and how to move your queries over, table by table.

> [!WARNING]
>
> The previous versions of the prediction market tables are
> deprecated from **November 16, 2026** and only gets critical fixes. It will be removed on **December 16, 2026**, after which queries against it fail.
>
> The [migration guide](https://docs.dune.com/data-catalog/curated/prediction-markets/migrating-to-v2.md) explains what changed.

## What changes

* **Polymarket markets carry Polymarket's own metadata.** Every listed market now has its Polymarket event and series, plus strikes, teams, scores, fees and oracle settings, as published on [polymarket.com](https://polymarket.com).
* **One naming standard across venues.** Polymarket uses the same identifier columns as Kalshi and Hyperliquid HIP-4: `market_id`, `event_id` and `outcome_id`.
* **New tables, side by side.** Each v2 table has the name of its v1 table plus `_v2`, for example `polymarket_polygon.market_trades_v2`. Both versions carry full history. The v1 tables stay available until their removal date, shown at the top of this page.
* **Breaking for Polymarket queries.** Several Polymarket columns are renamed and `event_id` changes value, so v1 queries fail or return different results on v2.

> [!NOTE]
>
> The table version is not the exchange version. Polymarket's exchange contracts also have versions, which the `contract_version` column (`v1`, `v2`, `v3`) reports in both table versions.

## Migrate in three steps

**1. Point your queries at the \_v2 tables**

Add `_v2` to every table name in the [table map](#table-map) below. Tables without a v2 keep their names.

**2. Rename the Polymarket identifier columns**

Replace `condition_id` and `combo_condition_id` with `market_id`, and `token_id`, `asset_id` and `position_id` with `outcome_id`. The values do not change. [Identifiers](#identifiers) has the details and [common renames](#common-renames) covers the other columns.

**3. Check event\_id and removed columns**

Polymarket `event_id` now holds Polymarket's event id instead of the neg-risk group id; use `neg_risk_market_id` where you relied on the old value. Then open each table you use under [table by table](#table-by-table) for removed columns and their replacements.

## Identifiers

Some Polymarket questions are split into several markets of which exactly one resolves Yes, such as one market per candidate in an election. Polymarket calls these neg-risk markets. In v1, `event_id` held the id of that group of markets; in v2 it holds Polymarket's event id.

| Column | v1 | v2 |
| - | - | - |
| `market_id` | The market's on-chain id, called the condition id (`0x…`). Called `condition_id` on `market_details`, `market_trades`, `market_actions` and `market_prices_hourly`, and `combo_condition_id` on the combo tables. | Called `market_id` on every Polymarket table, combos included. Values unchanged. |
| `outcome_id` | Called `token_id` on `market_details`, `combo_details`, `positions`, `ohlcv_hourly` and `market_prices_hourly`, `asset_id` on `market_trades` and `combo_trades`, and `position_id` on `combo_actions`. | Called `outcome_id` on every Polymarket table. Values unchanged: the token id of one side of a market. |
| `event_id` | The id of the neg-risk group (`0x…`), set only on neg-risk markets. | Polymarket's event id (a numeric string), set on every market Polymarket lists. The old value is in `neg_risk_market_id`. |
| `series_id` | Always `NULL` on Polymarket. | Polymarket's id of the recurring series the event belongs to; `NULL` outside a series. |

A small number of markets, almost all archived or closed and with a negligible share of volume, are not listed by Polymarket. They keep their `market_id` and stay in every table, but the columns that come from Polymarket's website, such as event and series, are `NULL`.

Renamed columns keep their v1 types. `market_id` is therefore `VARBINARY` in `market_trades_v2`, `market_actions_v2`, `market_prices_hourly_v2` and the combo tables, and a `0x…` `VARCHAR` in `market_details_v2`, `ohlcv_hourly_v2`, `open_interest_hourly_v2`, `positions_v2` and the cross-venue tables. Join across the two with `CAST(market_id AS VARCHAR)` on the `VARBINARY` side, or join on `outcome_id`, which is `UINT256` everywhere.

## Common renames

These renames apply in every Polymarket table that has the column.

| v1 column | v2 column | Notes |
| - | - | - |
| `token_outcome` | `outcome_name` | The side's label, such as Yes, No, Up or a team name |
| `event_market_id` | `neg_risk_market_id` | Values unchanged |
| `neg_risk` | `is_mutually_exclusive_event` | Now a `BOOLEAN`; v1 stored the text `'True'` or `'False'` |
| `event_market_name` | `event_title` | Now Polymarket's event title, set on every listed market |
| `event_market_description` | `event_description` | |
| `polymarket_link` | `link` | Now a plain URL to the event page; v1 stored an HTML link tag |
| `game_start_time` | `scheduled_start_time` | |
| `settlement_value` | `settlement_value_usd` | Values unchanged |
| `resolved_on_timestamp`, `resolved_at` | `settlement_ts` | Values unchanged |
| `token_outcome_name` | removed | It was `outcome_name`, a dash and the question in one string |
| `unique_key`, `_unique_key` | removed | Use `market_id`, `outcome_id` or `trade_id` |

## Table map

| v1 table | v2 table | Change |
| - | - | - |
| `polymarket_polygon.market_details` | [`polymarket_polygon.market_details_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/market_details) | Breaking |
| `polymarket_polygon.market_trades` | [`polymarket_polygon.market_trades_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/market_trades) | Breaking |
| `polymarket_polygon.market_actions` | [`polymarket_polygon.market_actions_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/market_actions) | Breaking |
| `polymarket_polygon.market_prices_hourly` | [`polymarket_polygon.market_prices_hourly_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/market_prices_hourly) | Breaking |
| `polymarket_polygon.ohlcv_hourly` | [`polymarket_polygon.ohlcv_hourly_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/ohlcv_hourly) | Breaking |
| `polymarket_polygon.positions` | [`polymarket_polygon.positions_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/positions) | Breaking |
| `polymarket_polygon.open_interest_hourly` | [`polymarket_polygon.open_interest_hourly_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/open_interest_hourly) | Values change |
| `polymarket_polygon.combo_details` | [`polymarket_polygon.combo_details_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/combo_details) | Breaking |
| `polymarket_polygon.combo_trades` | [`polymarket_polygon.combo_trades_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/combo_trades) | Breaking |
| `polymarket_polygon.combo_actions` | [`polymarket_polygon.combo_actions_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/combo_actions) | Breaking |
| `polymarket_polygon.users_address_lookup` | [`polymarket_polygon.users_address_lookup_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/polymarket/users_address_lookup) | Values change |
| `prediction_markets.markets` | [`prediction_markets.markets_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/prediction_markets/markets) | Breaking |
| `prediction_markets.trades` | [`prediction_markets.trades_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/prediction_markets/trades) | Values change |
| `prediction_markets.ohlcv_hourly` | [`prediction_markets.ohlcv_hourly_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/prediction_markets/ohlcv_hourly) | Values change |
| `prediction_markets.open_interest_hourly` | [`prediction_markets.open_interest_hourly_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/prediction_markets/open_interest_hourly) | Values change |
| `kalshi.market_details` | [`kalshi.market_details_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/kalshi/market_details) | Breaking |
| `kalshi.ohlcv_hourly` | [`kalshi.ohlcv_hourly_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/kalshi/ohlcv_hourly) | Breaking |
| `hip4_hyperliquid.market_details` | [`hip4_hyperliquid.market_details_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/hip4/market_details) | Breaking |
| `hip4_hyperliquid.market_trades` | [`hip4_hyperliquid.market_trades_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/hip4/market_trades) | Same columns |
| `hip4_hyperliquid.ohlcv_hourly` | [`hip4_hyperliquid.ohlcv_hourly_v2`](https://docs.dune.com/data-catalog/curated/prediction-markets/hip4/ohlcv_hourly) | Breaking |

**Breaking** means a column was renamed or removed, so v1 queries fail. **Values change** means the columns are the same but some values differ. Tables without a v2, such as `kalshi.market_trades`, `kalshi.open_interest_hourly`, `hip4_hyperliquid.open_interest_hourly`, `hip4_hyperliquid.positions_daily` and `polymarket_polygon.combo_prices_hourly`, keep their names.

## Table by table

Open a table to see every column that changes. Columns not listed are unchanged.

> [accordion] polymarket\_polygon.market\_details\_v2 (breaking)
>
> One row per outcome token, two per market, as in v1. Tokens, prices, outcomes and resolution still come from the order book and the chain. The new columns hold the latest values Polymarket publishes, not the values at trade time.
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `market_id` | Renamed | Previously `condition_id`. Values unchanged; shared by the market's two tokens. |
> | `outcome_id` | Renamed | Previously `token_id`. Values unchanged; one row per `outcome_id`. |
> | `outcome_name` | Renamed | Previously `token_outcome`. |
> | `status` | New | The market's lifecycle in one column: `active` while it trades, `closed` once trading has ended or the market was delisted, `settled` once its outcome is decided. The same values as `prediction_markets.markets_v2.status`. |
> | `gamma_market_id` | New | Polymarket's own market id. `NULL` where Polymarket does not list the market, and then every column below that comes from Polymarket's website is `NULL` too. |
> | `event_id` | New | The Polymarket event the market is listed under. |
> | `event_title`, `event_slug`, `event_description` | New | The event's title, URL slug and description on polymarket.com. Replace `event_market_name` and `event_market_description`. |
> | `parent_event_id` | New | The event this market's event is nested under, as sports side events (player props, exact score) are under their game. `NULL` for a top-level event. |
> | `series_id`, `series_title`, `frequency` | New | The recurring series, its name, and how often it recurs: `five_min`, `fifteen_min`, `hourly`, `four_hour`, `daily`, `weekly`, `monthly` or `annual`. `NULL` outside a series. |
> | `neg_risk_market_id` | Renamed | Previously `event_market_id`. Values unchanged; `NULL` when `is_mutually_exclusive_event` is false. |
> | `is_mutually_exclusive_event` | Renamed | Previously `neg_risk`; the name Kalshi, HIP-4 and `prediction_markets.markets_v2` use. |
> | `link` | Renamed | Previously `polymarket_link`, an HTML link tag whose target was often not a real page. Now a plain URL to the event page; `NULL` where Polymarket does not list the market. |
> | `strike_type`, `floor_strike`, `cap_strike` | New | Strike of the Yes side (side 0), in the same notation as `kalshi.market_details_v2` and `prediction_markets.markets_v2`; see the examples below. `NULL` where a market has no numeric strike. |
> | `sports_market_type` | New | Polymarket's sports market type, such as `moneyline`, `spreads`, `totals` or `soccer_exact_score`. `NULL` outside sports. |
> | `yes_sub_title` | New | The market's label within its event: a team, a candidate or a price range. |
> | `competition`, `home_team`, `away_team` | New | League of a sports event and its home and away team as Polymarket displays them. For esports `competition` is the game and for tennis the tour; the league is in `event_metadata`. The teams are `NULL` unless the event has exactly two. |
> | `teams` | New | Every team or player of a sports event as JSON: id, name, display name (`alias`), abbreviation, league, and home or away. Also covers events with more than two sides. |
> | `scheduled_start_time` | Renamed | Previously `game_start_time`. Same values where it was set, and now also filled from Polymarket's listing, such as the start of each Up/Down window. |
> | `market_end_time` | Values change | Now the scheduled end time including the time of day; previously the date only, at midnight UTC. Still not the resolution time: use `settlement_ts`. |
> | `game_end_time`, `score` | New | When the game finished, and its score: the latest score while a game is live, final once the event has closed. The format varies by sport. |
> | `event_metadata`, `market_metadata` | New | Extra event and market details as JSON, such as the league, stage and format of a sports event, the start and final price of an Up/Down market, and the points line or player of a prop. |
> | `settlement_source` | New | The source Polymarket names for resolving the market, usually a URL. |
> | `fee_type`, `fee_rate`, `fee_exponent`, `maker_rebate_rate`, `is_fee_taker_only` | New | The market's fee schedule: name, rate, price exponent, the share of fees paid back to makers, and whether only takers pay. `NULL` where the market charges no fees. |
> | `maker_base_fee_bps`, `taker_base_fee_bps` | New | Fee rates from Polymarket's older fee model, used on some 2023 and 2024 markets. On markets with a fee schedule, fees follow `fee_rate`. |
> | `underlying`, `expiration_value` | New | On price markets, the ticker of the asset tracked (`BTC`, `NVDA`, `XAU`, `USD/JPY`, …), and on Up/Down markets the final price the market resolved against. |
> | `election_type`, `election_country` | New | Type of an election event, and its country or region. |
> | `uma_bond`, `uma_reward`, `liveness_seconds` | New | Settings of UMA, the oracle that resolves Polymarket markets: the bond posted to propose a result, the reward for an undisputed result (both in USD), and the dispute window in seconds (`0` means the default of two hours). |
> | `is_other_outcome` | New | `TRUE` on the catch-all "Other" market of a multi-outcome event. |
> | `settlement_value_usd`, `settlement_ts` | Renamed | Previously `settlement_value` and `resolved_on_timestamp`. Values unchanged. |
> | `_updated_at` | New | When the row last changed; unchanged rows keep their stamp. Replaces `last_uploaded_at`, `content_hash` and `last_changed_at`. |
> | `tags` | Values change | Now sorted alphabetically. |
> | `token_outcome_name`, `unique_key` | Removed | See [common renames](#common-renames). |
> | `active`, `enable_order_book` | Removed | `active` was true on nearly every market, closed ones included. Use `status` and `accepting_orders`. |
> | `icon` | Removed | Identical to `image`. |
> | `oracle`, `fee_bips` | Removed | Set only on neg-risk markets: `fee_bips` was always 0, and `oracle` was not the address that resolves the market. |
>
> How each kind of Polymarket market fills the strike columns for its Yes side:
>
> | Market type | Yes side | `strike_type` | Strikes |
> | - | - | - | - |
> | Totals (`O/U 1.5`) | Over | `greater` | The total line (1.5) |
> | Spreads and handicaps (`Team A (-1.5)`) | Team A covers | `greater` | The margin Team A must win by (1.5); Polymarket lists the side giving the points first, so it is positive |
> | Up/Down | Up | `greater_or_equal` | The reference price at the start of the window |
> | Price bracket (`$1.70-1.80`) | The price ends in the bracket | `between` | `floor_strike` 1.70, `cap_strike` 1.80; a price exactly on the boundary belongs to the higher bracket |
> | Whole-number bracket (`90-91°F`) | The value is in the bracket | `between` | `floor_strike` 90, `cap_strike` 91, both included |
> | Exact value (`36°C`) | The value is exactly that | `between` | `floor_strike` and `cap_strike` both 36 |
> | Above (`Bitcoin above 64,800`) | Above the strike | `greater` | `floor_strike` 64,800 |
> | At least (`94°F or higher`) | At or above the strike | `greater_or_equal` | `floor_strike` 94 |
> | Below (`<0.90`) | Below the strike | `less` | `cap_strike` 0.90 |
> | At most (`19°C or below`) | At or below the strike | `less_or_equal` | `cap_strike` 19 |
> | Reach (`↑ 83,000`) | The price touches the strike during the window | `greater_or_equal` | `floor_strike` 83,000 |
> | Dip (`↓ 1.15`) | The price touches the strike during the window | `less_or_equal` | `cap_strike` 1.15 |

> [accordion] polymarket\_polygon.market\_trades\_v2 (breaking)
>
> One row per fill, as in v1. The market columns hold the values known when the fill was written; `market_details_v2` holds the current ones.
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `market_id` | Renamed | Previously `condition_id`. Values unchanged. |
> | `outcome_id` | Renamed | Previously `asset_id`. Values unchanged: the token traded. |
> | `trade_id` | New | Fill identifier, unique per fill and the table's key. Same value as `prediction_markets.trades_v2.trade_id`. |
> | `event_id` | Values change | Polymarket's event id instead of the neg-risk group id, set on far more fills. |
> | `series_id` | New | The recurring series the market's event belongs to. |
> | `event_title` | New | Replaces `event_market_name`. |
> | `outcome_name`, `link`, `is_mutually_exclusive_event` | Renamed | Previously `token_outcome`, `polymarket_link` and `neg_risk`. `is_mutually_exclusive_event` is a `BOOLEAN`. |
> | `event_market_name`, `token_outcome_name`, `unique_key` | Removed | Use `event_title`, `outcome_name` with `question`, and `trade_id`. |

> [accordion] polymarket\_polygon.market\_actions\_v2 (breaking)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `market_id` | Renamed | Previously `condition_id`. Values unchanged; `NULL` on convert rows. |
> | `neg_risk_market_id` | Renamed | Previously `event_market_id`. Values unchanged; set on convert rows. Joins `market_details_v2.neg_risk_market_id`. |
> | `event_title` | Renamed | Previously `event_market_name`; now the Polymarket event title. |
> | `link`, `is_mutually_exclusive_event` | Renamed | Previously `polymarket_link` and `neg_risk`. |

> [accordion] polymarket\_polygon.market\_prices\_hourly\_v2 (breaking)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `market_id` | Renamed | Previously `condition_id`. Values unchanged. |
> | `outcome_id` | Renamed | Previously `token_id`. Values unchanged. |

> [accordion] polymarket\_polygon.ohlcv\_hourly\_v2 (breaking)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `outcome_id` | Renamed | Previously `token_id`. Values unchanged. |
> | `outcome_index` | New | Side of the token: 0 for the market's first outcome, 1 for the second. |
> | `event_title` | Renamed | Previously `event_market_name`. Now the event title on every listed market; `NULL` for combos. |
> | `market_end_time` | Removed | It was the market's on-chain resolution time. Use `settlement_ts` in `market_details_v2` or `combo_details_v2`. |
> | `open`, `high`, `low`, `close`, `vwap` | Values change | Now also include trades where a buyer of Yes is matched with a buyer of No. In v1 these trades set the price of only one side. A bar can now have a price but zero volume. Combos are unchanged. |
> | `volume_contracts`, `volume_usd`, `trade_count` | Unchanged | Still counted once per trade. |
> | `_unique_key` | Removed | The table is unique on `(block_month, hour, market_id, outcome_index)`. |

> [accordion] polymarket\_polygon.positions\_v2 (breaking)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `outcome_id` | Renamed | Previously `token_id`. Values unchanged. |
> | `outcome_index` | New | Side of the token held: 0 for Yes or the first outcome, 1 for No or the second. With `market_id` it identifies the token without a join. |
> | `price`, `balance_usd` | Values change | Priced from the `ohlcv_hourly_v2` close, so they differ on days where the v1 close was stale. |

> [accordion] polymarket\_polygon.open\_interest\_hourly\_v2 (values change)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `event_id` | Values change | Polymarket's event id of the market's mutually exclusive set instead of the neg-risk group id. Still `NULL` for a standalone market. |

> [accordion] polymarket\_polygon.combo\_details\_v2 (breaking)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `market_id` | Renamed | Previously `combo_condition_id`. Values unchanged. |
> | `outcome_id` | Renamed | Previously `token_id`. Values unchanged. |
> | `outcome_name` | Renamed | Previously `token_outcome`: Yes or No. |
> | `settlement_value_usd`, `settlement_ts` | Renamed | Previously `settlement_value` and `resolved_at`. Values unchanged. |
> | `token_outcome_name` | Removed | It was the side label, a dash and `combo_name` in one string. |
> | `combo_condition_id_uint` | Removed | It was `market_id` written as a number. |

> [accordion] polymarket\_polygon.combo\_trades\_v2 (breaking)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `market_id` | Renamed | Previously `combo_condition_id`. Values unchanged. |
> | `outcome_id` | Renamed | Previously `asset_id`. Values unchanged: the token traded. |
> | `settlement_value_usd` | Renamed | Previously `settlement_value`. Values unchanged. |
> | `trade_id` | New | Fill identifier, the same value as `prediction_markets.trades_v2.trade_id`. |
> | `token_outcome_name` | Removed | It was the side label, a dash and `combo_name` in one string. |

> [accordion] polymarket\_polygon.combo\_actions\_v2 (breaking)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `market_id` | Renamed | Previously `combo_condition_id`. Values unchanged. |
> | `outcome_id` | Renamed | Previously `position_id`. Values unchanged. |

> [accordion] polymarket\_polygon.users\_address\_lookup\_v2 (values change)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `wallet_type` | New value | `deposit wallet`, one row per deposit wallet (the account wallet Polymarket gives new users since May 2026), next to `safe` and `magic.link`. `owner` is `NULL` on these rows. |
> | `first_funded_time`, `first_funded_by`, `first_funded_tx_hash`, `has_been_funded` | Values change | Payouts, rewards, wraps of collateral the wallet already held and self-transfers no longer count as funding, so a wallet whose first inflow was a payout now shows its first real deposit. |

> [accordion] prediction\_markets.markets\_v2 (breaking)
>
> One row per market, as in v1. Kalshi rows change only by the removed column.
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `event_id` | Values change (Polymarket) | Polymarket's event id for every listed market instead of the neg-risk group id. |
> | `event_name` | Values change (Polymarket) | The event title for every listed market; previously `NULL` on standalone markets. |
> | `series_id`, `frequency` | Values change (Polymarket) | Previously always `NULL` on Polymarket; now the values in `market_details_v2`. `frequency` gains `five_min` and `four_hour`. |
> | `strike_type`, `floor_strike`, `cap_strike` | Values change (Polymarket) | Previously always `NULL` on Polymarket; now the values in `market_details_v2`. |
> | `link` | Values change (Polymarket) | The event page on polymarket.com; `NULL` where Polymarket does not list the market. |
> | `market_end_time` | Values change (Polymarket) | Now includes the time of day. |
> | `source_updated_at` | Removed (every venue) | It meant something different on each venue. Use `_updated_at`, which changes only when a value changes. |
>
> **Comparing strikes across venues.** Both venues use the same `strike_type` values, and `floor_strike` and `cap_strike` mean the same on both, with three differences:
>
> * On price brackets, Kalshi sets `cap_strike` one tick below the next bracket (`75,299.99`); Polymarket uses the next bracket's floor (`1.80`) and gives a price exactly on it to the higher bracket. Whole-number brackets include both ends on both venues.
> * For "X or above", Kalshi uses `greater` with `floor_strike` one tick below X; Polymarket uses `greater_or_equal` with X. Both mean the Yes side wins at X.
> * Markets that resolve when the price touches a level (Polymarket's reach and dip ladders, Kalshi's max and min series) carry the same strike types as markets that settle at the close. The question says which kind it is.

> [accordion] prediction\_markets.trades\_v2 (values change)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `event_id` | Values change (Polymarket) | Polymarket's event id instead of the neg-risk group id. |

> [accordion] prediction\_markets.ohlcv\_hourly\_v2 (values change)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `open`, `high`, `low`, `close`, `vwap` | Values change (Polymarket) | Follow the prices in `polymarket_polygon.ohlcv_hourly_v2`. |

> [accordion] prediction\_markets.open\_interest\_hourly\_v2 (values change)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `event_id` | Values change (Polymarket) | Polymarket's event id of the market's mutually exclusive set. Still `NULL` for a standalone market. |

> [accordion] kalshi.market\_details\_v2 (breaking)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `source_updated_at`, `updated_time` | Removed | Use `_updated_at`. |
> | `_updated_at` | Behavior change | Changes only when a value changes; unchanged rows keep their stamp. |
> | `created_date` | New | UTC date of `created_time`; the table's partition column. |

> [accordion] kalshi.ohlcv\_hourly\_v2 (breaking)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `market_end_time` | Removed | It was the market's settlement time once known, otherwise its expected expiration. Use `settlement_ts` or `expected_expiration_time` in `kalshi.market_details_v2`. |

> [accordion] hip4\_hyperliquid.market\_details\_v2 (breaking)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `source_updated_at` | Removed | Use `_updated_at`. |

> [accordion] hip4\_hyperliquid.market\_trades\_v2 (same columns)
>
> No column changes. Each trade has two rows, one for each side, and both share a `trade_id`. Rows are unique on `(block_month, trade_id, is_taker)`.

> [accordion] hip4\_hyperliquid.ohlcv\_hourly\_v2 (breaking)
>
> | Column | Change | What it means for you |
> | - | - | - |
> | `market_end_time` | Removed | It was the market's settlement time once known, otherwise its expected expiration. Use `settlement_ts` or `expected_expiration_time` in `hip4_hyperliquid.market_details_v2`. |

## Rewriting a query

Volume by question for the outcomes of mutually exclusive events, in v1:

```sql theme={null}
SELECT
  t.event_market_name,
  t.question,
  d.token_outcome,
  SUM(t.amount) AS volume_usd
FROM polymarket_polygon.market_trades t
JOIN polymarket_polygon.market_details d ON d.token_id = t.asset_id
WHERE t.block_time >= NOW() - INTERVAL '7' DAY
  AND t.is_taker_side
  AND t.neg_risk = 'True'
GROUP BY 1, 2, 3
ORDER BY 4 DESC
LIMIT 20
```

The same query in v2:

```sql theme={null}
SELECT
  t.event_title,
  t.question,
  d.outcome_name,
  SUM(t.amount) AS volume_usd
FROM polymarket_polygon.market_trades_v2 t
JOIN polymarket_polygon.market_details_v2 d ON d.outcome_id = t.outcome_id
WHERE t.block_time >= NOW() - INTERVAL '7' DAY
  AND t.is_taker_side
  AND t.is_mutually_exclusive_event
GROUP BY 1, 2, 3
ORDER BY 4 DESC
LIMIT 20
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.