prediction_trades
Historical data This query uses the realtime dataset (the default), which holds only a recent window - hours to days depending on the cube. For older data add a dataset to the top-level element: EVM(network: matic, dataset: combined) archive full history combined archive + realtime in one result
What it returns
- transaction hash
- transaction time
- block hash
- decimals
- collateral token name
- smart contract
- collateral token symbol
- condition ID
- protocol name
- label
- outcome ID
- outcome index
- market ID
- created at
- question ID
- image
- title
- asset ID
- outcome trade amount
- buyer
- seller
- collateral amount
- is outcome buy
- fee amount
- payer
- currency symbol
The query
# Historical data
# This query uses the realtime dataset (the default), which holds only a
# recent window - hours to days depending on the cube.
#
# For older data add a dataset to the top-level element:
#
# EVM(network: matic, dataset: combined)
#
# archive full history
# combined archive + realtime in one result
#
# Archive and combined need the historical data add-on:
# https://bitquery.io/pricing
#
# Datasets: https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#
query pairs {
EVM(network: matic) {
PredictionTrades(
limit: {count: 10}
where: {Trade: {OutcomeTrade: {IsOutcomeBuy: true}}}
orderBy: {descending: Transaction_Time}) {
Transaction{
Hash
Time
}
Block{
Hash
}
Trade {
Prediction {
CollateralToken { # token used to pay for the outcom
Decimals
Name
SmartContract
Symbol
}
ConditionId
Marketplace {
ProtocolName
}
Outcome {
Label
Id
Index
}
Question {
MarketId
CreatedAt
Id
Image
Title
}
OutcomeToken {
Decimals
ProtocolName
AssetId
}
}
OutcomeTrade {
Amount
Buyer
Seller
CollateralAmount
IsOutcomeBuy
Fee{
Amount
Payer
Currency{
Symbol
Decimals
SmartContract
AssetId
}
}
}
}
}
}
}
Similar queries
- Polymarket Volume by Exchange Contract and Collateral · Polygon · PredictionTrades
- latest prediction market trades · Polygon · PredictionTrades
- activity of user · Polygon · PredictionTrades
- Polymarket Notional Volume, Taker Volume,Maker Volume · Polygon · PredictionTrades
- buys and sells of a wallet on polymarket · Polygon · PredictionTrades