The polygon.predictions.trades_enriched table provides enhanced trade data with comprehensive market metadata, categorization, and outcome information. This table extends the basic trades data with rich context about markets, questions, and resolution outcomes. Use this table for advanced analytics, market research, and outcome tracking across prediction markets on Polygon.

Table Columns

_str columns are numeric fields cast to varchar to retain precision. Unique Key: unique_id
Column NameData TypeDescription
event_nameVARCHARType of trade event (OrderFilled, FPMMBuy, FPMMSell).
projectVARCHARProject name where the trade occurred.
protocolVARCHARProtocol name where the trade occurred.
exchange_typeVARCHARExchange type (CTFExchange, NegRiskCTFExchange, FPMM).
condition_idVARCHARCondition ID that identifies the prediction market condition.
market_idVARCHARMarket identifier from onchain data.
market_nameVARCHARMarket name from onchain events.
market_description_onchainVARCHARMarket description from onchain events.
question_idVARCHARUnique question identifier.
questionVARCHARMarket question text.
question_descriptionVARCHARMarket description from API.
neg_riskBOOLEANWhether this is a NegRisk market.
categoryVARCHARMain category (politics, sports, crypto, etc.).
sub_categoryVARCHARSpecific subcategory.
tagsVARCHARAPI category tags.
asset_idVARCHARAsset/token ID of the outcome token being traded.
token_outcomeVARCHARToken outcome name.
token_outcome_nameVARCHARCombined outcome and question name.
token_priceFLOATCurrent token price.
is_winning_outcomeBOOLEANWhether this outcome won the market (API data).
market_addressVARCHARAddress of the market contract where the trade occurred.
order_hashVARCHARHash of the order (null for FPMM trades).
makerVARCHARAddress of the maker (order creator) in the trade.
takerVARCHARAddress of the taker (order fulfiller) in the trade.
collateral_amount_rawVARCHARRaw unnormalized collateral amount.
token_amount_rawVARCHARRaw unnormalized outcome token amount.
price_strVARCHARCalculated share price as a precise string representation.
trade_priceFLOATCalculated share price as float for calculations and analytics.
maker_amount_rawVARCHARRaw unnormalized amount from maker side of the trade.
taker_amount_rawVARCHARRaw unnormalized amount from taker side of the trade.
fee_rawVARCHARRaw unnormalized fee amount.
collateral_amountVARCHARNormalized collateral amount (divided by token decimals).
fee_amountVARCHARNormalized fee amount (divided by token decimals).
collateral_token_addressVARCHARAddress of the collateral token.
collateral_token_nameVARCHARName of the collateral token.
collateral_token_symbolVARCHARSymbol of the collateral token.
collateral_token_decimalsNUMBERNumber of decimals for the collateral token.
usd_exchange_rateFLOATUSD exchange rate for the collateral token.
usd_collateral_amountFLOATUSD value of the collateral amount.
usd_fee_amountFLOATUSD value of the fee paid in the trade.
transaction_indexNUMBERIndex of the transaction in the block.
transaction_hashVARCHARHash of the transaction containing the trade.
log_indexNUMBERIndex of the log within the transaction.
block_timestampTIMESTAMP_NTZ(9)Timestamp of the block containing the trade.
block_numberNUMBERBlock number containing the trade.
block_hashVARCHARHash of the block containing the trade.
unique_idVARCHARUnique identifier for each trade.
_created_atTIMESTAMP_NTZ(9)Record creation timestamp.
_updated_atTIMESTAMP_NTZ(9)Record update timestamp.

Sample Query

Analyze trading volume by market category:
select
  category,
  count(*) as total_trades,
  count(distinct market_id) as unique_markets,
  sum(usd_collateral_amount) as total_volume_usd
from polygon.predictions.trades_enriched
where block_timestamp >= current_timestamp - interval '30 days'
group by category
order by total_volume_usd desc