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

By alex · saved 16 February 2026 · run 194 times · Bitquery API v2

What it returns

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