per-market wallet aggregates
Returns 5000 prediction trades on Polygon, where question ID is 0x4a98…3f00, sorted by USD, highest first: buyer, sum of trade outcome trade collateral amount in USD, count and seller.
What it returns
- buyer
- sum of trade outcome trade collateral amount in USD
- count
- seller
Filters
- question ID is 0x4a98…3f00
The query
query WalletAggregates($questionId: String!, $perSide: Int!) {
EVM(dataset: realtime, network: matic) {
buyers: PredictionTrades(
where: {
TransactionStatus: { Success: true }
Block: { Time: { since_relative: {days_ago:4} } }
Trade: { Prediction: { Question: { Id: { is: $questionId } } } }
}
limit: { count: $perSide }
limitBy: { by: Trade_OutcomeTrade_Buyer, count: 1 }
orderBy: { descendingByField: "usd" }
) {
Trade { OutcomeTrade { Buyer } }
usd: sum(of: Trade_OutcomeTrade_CollateralAmountInUSD)
trade_count: count
}
sellers: PredictionTrades(
where: {
TransactionStatus: { Success: true }
Block: { Time: { since_relative:{days_ago:4} } }
Trade: { Prediction: { Question: { Id: { is: $questionId } } } }
}
limit: { count: $perSide }
limitBy: { by: Trade_OutcomeTrade_Seller, count: 1 }
orderBy: { descendingByField: "usd" }
) {
Trade { OutcomeTrade { Seller } }
usd: sum(of: Trade_OutcomeTrade_CollateralAmountInUSD)
trade_count: count
}
}
}
Variables
{
"questionId": "0x4a988370f74fae221e5dfd27ed58707c531647fde9e2292363e1de1628a23f00",
"perSide": 5000
}
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