Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.allium.so/llms.txt

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

The polygon.predictions.markets table provides metadata for prediction markets, combining API data, onchain events, and resolution outcomes at the token level. Each row represents a specific outcome token within a market. Use this table to discover markets, analyze resolution patterns, and understand market structure across different categories.

Table Columns

Unique Key: market_unique_id, token_id
Column NameData TypeDescription
projectVARCHARProject name (ex. polymarket).
protocolVARCHARProtocol name (ex. polymarket).
market_unique_idVARCHARUnique key for grouping related markets.
condition_idVARCHARUnique condition identifier.
market_idVARCHARMarket identifier.
market_request_idVARCHARNegRisk market request ID.
market_nameVARCHARMarket name from onchain data.
market_description_onchainVARCHARMarket description from onchain events.
question_idVARCHARUnique question identifier.
questionVARCHARMarket question text.
descriptionVARCHARMarket description from API.
token_idVARCHARToken ID for this outcome.
token_outcomeVARCHARToken outcome name.
token_nameVARCHARCombined outcome and question name.
token_priceFLOATCurrent token price.
is_winnerBOOLEANWhether this outcome won.
activeBOOLEANWhether market is active.
archivedBOOLEANWhether market is archived.
closedBOOLEANWhether market is closed.
accepting_ordersBOOLEANWhether accepting new orders.
enable_order_bookBOOLEANWhether order book is enabled.
neg_riskBOOLEANWhether this is a NegRisk market.
resolved_byVARCHAREntity responsible for resolution.
categoryVARCHARMain category.
sub_categoryVARCHARSpecific subcategory.
tagsVARCHAROriginal category tokens.
api_categoryVARCHAROriginal category from API before categorization.
api_typeVARCHARAPI data source type.
start_dateTIMESTAMP_NTZ(9)Market start time.
end_dateTIMESTAMP_NTZ(9)Market end time.
game_start_timeTIMESTAMP_NTZ(9)Event start time.
seconds_delayNUMBERResolution delay in seconds.
fpmmVARCHARFPMM contract address.
maker_feeFLOATMaker fee.
taker_feeFLOATTaker fee.
oracleVARCHAROracle contract address.
fee_bipsNUMBERFee in basis points.
prepared_atTIMESTAMP_NTZ(9)Market preparation timestamp.
outcomeVARCHARResolution outcome.
resolved_atTIMESTAMP_NTZ(9)Resolution timestamp.
created_atTIMESTAMP_NTZ(9)API record creation time.
updated_atTIMESTAMP_NTZ(9)API record update time.

Sample Query

Find market category diversity:
select
  category, 
  count(*) as category_count
from polygon.predictions.markets 
group by category
order by category_count desc