Skip to main content
The polygon.predictions.open_interest_hourly view provides hourly snapshots of open interest across all prediction markets. Unlike the daily user-based view, this tracks total token supply from ERC1155 credit/debit events. Use this view for granular liquidity analysis, intraday TVL tracking, and understanding market dynamics at hourly resolution.

Table Columns

Unique Key: unique_id
Column NameData TypeDescription
projectVARCHARProject name (polymarket).
protocolVARCHARProtocol name (polymarket).
block_hourTIMESTAMP_NTZ(9)Hour timestamp for the open interest snapshot.
token_addressVARCHARConditional Tokens contract address.
condition_idVARCHARUnique condition identifier for the market.
market_unique_idVARCHARUnique key for grouping related markets.
market_idVARCHARMarket identifier.
market_nameVARCHARMarket name.
market_descriptionVARCHARMarket description.
question_idVARCHARUnique question identifier.
questionVARCHARMarket question text.
question_descriptionVARCHARDetailed question description.
token_idVARCHARToken ID for the specific outcome token.
token_outcomeVARCHARToken outcome name (Yes/No).
categoryVARCHARMain category of the market.
sub_categoryVARCHARSpecific subcategory of the market.
tagsVARCHARMarket tags.
neg_riskBOOLEANWhether this is a NegRisk market.
resolution_outcomeVARCHARMarket resolution outcome if resolved.
resolved_atTIMESTAMP_NTZ(9)Market resolution timestamp.
open_interestFLOATTotal token supply (cumulative net credits minus debits across all holders), normalized by 1e6.
token_priceFLOATPrice per token at this hour (see fallback chain below).
open_interest_usdFLOATUSD value of the open interest (open_interest * token_price). Uses 0 when token_price is null.
market_activeBOOLEANWhether market is currently active.
market_closedBOOLEANWhether market is closed.
market_accepting_ordersBOOLEANWhether market is accepting new orders.
is_winnerBOOLEANWhether this outcome won the market.
unique_idVARCHARUnique identifier combining block_hour and token_id.

Understanding Token Price Fallback

The token_price column uses a 5-level fallback chain (first non-null wins):
  1. Trade-based hourly price from token_prices_hourly
  2. Chain resolution outcome/token_outcome yes/no mapping (hour >= coalesce(resolved_at, end_date))
  3. API is_winner=true gives 1.0 (hour >= coalesce(resolved_at, end_date))
  4. API token_price when exactly 0 or 1 (hour >= coalesce(resolved_at, end_date))
  5. API token_price as-is (best available estimate from markets metadata)
Null only for tokens with no API price data.

Sample Query

SELECT 
  block_hour,
  market_name,
  token_outcome,
  open_interest,
  token_price,
  open_interest_usd
FROM polygon.predictions.open_interest_hourly
WHERE block_hour >= CURRENT_TIMESTAMP - INTERVAL '24 hours'
ORDER BY open_interest_usd DESC
LIMIT 100;