24 hours trades for a wallet

Returns prediction trades on Polygon, where outcome trade buyer is 0x101f…8e1a and marketplace protocol name is polymarket: collateral amount in USD and condition ID.

By Kshitij Mahajan · saved 24 March 2026 · run 6 times · Bitquery API v2

What it returns

Filters

The query

query WalletTrades($hoursAgo: Int!, $buyer: String!) {
  EVM(network: matic) {
    buys: PredictionTrades(
      where: {
        Trade: {
          Prediction: {
            Marketplace: {ProtocolName: {is: "polymarket"}},
          },
          OutcomeTrade: {IsOutcomeBuy: true, Buyer: {is: $buyer}}
        },
        Block: {Time: {since_relative: {hours_ago: $hoursAgo}}}
      }
    ) {
      Trade {
        OutcomeTrade { CollateralAmountInUSD }
        Prediction { ConditionId }
      }
    }

    sells: PredictionTrades(
      where: {
        Trade: {
          Prediction: {
            Marketplace: {ProtocolName: {is: "polymarket"}},
          },
          OutcomeTrade: {IsOutcomeBuy: false, Buyer: {is: $buyer}}
        },
        Block: {Time: {since_relative: {hours_ago: $hoursAgo}}}
      }
    ) {
      Trade {
        OutcomeTrade { CollateralAmountInUSD }
        Prediction { ConditionId }
      }
    }
  }
}

Variables

{
  "hoursAgo": 24,
  "buyer": "0x101f2f96db1e39a9f36a1fa067751d541fd38e1a"
  
}

Similar queries