Skip to main content
The polymarket_polygon.market_trades table contains trade-level activity across all Polymarket market outcomes on Polygon.

Table Schema

ColumnTypeDescription
block_numberBIGINTBlock number
block_timeTIMESTAMPUTC event block time
tx_hashVARBINARYTransaction hash
evt_indexINTEGEREvent index within the transaction
actionVARCHARType of trade (CLOB or AMM)
contract_addressVARBINARYContract address (CTF exchange or neg risk module)
condition_idVARBINARYUnique identifier for the YES/NO pair
event_market_nameVARCHAROverarching question for negRisk markets
questionVARCHARConcrete outcome being bet on
polymarket_linkVARCHARLink to Polymarket page
token_outcomeVARCHARYES or NO token outcome
neg_riskVARCHARWhether this is a neg_risk market
asset_idUINT256ERC1155 token ID
priceDOUBLEPrice of the outcome token
amountDOUBLEAmount in USD
sharesDOUBLENumber of shares transferred
feeDOUBLEFees to Polymarket (currently not enabled)
makerVARBINARYTrader whose order is being filled
takerVARBINARYTrader filling the order
unique_keyVARCHARUnique event/market key
token_outcome_nameVARCHARCombined token outcome and question

Table sample

Query performance

market_trades is a view — always include a block_time filter. For market-specific queries, also filter on condition_id or question.
-- ✅ Good: time-bounded with market filter
SELECT * FROM polymarket_polygon.market_trades
WHERE block_time >= NOW() - INTERVAL '7' DAY
  AND condition_id = 0x...

Example query

-- Top markets by trading volume (last 7 days)
SELECT
  event_market_name,
  question,
  SUM(amount) AS total_volume_usd,
  COUNT(*) AS num_trades
FROM polymarket_polygon.market_trades
WHERE block_time >= NOW() - INTERVAL '7' DAY
GROUP BY 1, 2
ORDER BY 3 DESC
LIMIT 20