Trading Trades

Returns 1000 trades, where market network is Solana and market protocol family is Pumpfun: trader address, token address, token symbol, sum of amounts in USD base, calculate and count.

By boydiamond · saved 17 November 2026 · Bitquery API v2

What it returns

Filters

The query

{
  Trading {
    Trades(
      limit: {count: 1000}
      orderBy: [{descendingByField: "PnL"}]
      where: {
        Block: {
          Time: {
            since_relative: {days_ago: 7}
          }
        }
        Pair: {
          Market: {
            Network: {is: "Solana"}
            ProtocolFamily: {is: "Pumpfun"}
          }
        }
      }
    ) {
      Trader {
        Address
      }
      Pair {
        Token {
          Address
          Symbol
        }
      }
      Amount_Bought: sum(
        of: AmountsInUsd_Base,
        if: {Side: {is: "Buy"}}
      )
      Amount_Sold: sum(
        of: AmountsInUsd_Base,
        if: {Side: {is: "Sell"}}
      )
      PnL: calculate(
        expression: "$Amount_Sold - $Amount_Bought"
      )
      Buys: count(if: {Side: {is: "Buy"}})
      Sells: count(if: {Side: {is: "Sell"}})
    }
  }
}

Similar queries