Top Traders by PnL of a specific token

Returns 10 trades, where token ID is bid:solana:8xs8TCoAMJ4zj5aeXmrDP2BechGrXLMzVyMVBxfCpump, sorted by pn l, highest first: trader address, sum of amounts in USD base, sum of amounts base, calculate, count, currency ID, currency name and 11 more fields.

By Akshat · saved 6 April 2026 · Bitquery API v2

What it returns

Filters

The query

{
  Trading {
    Trades(
      limit:{count:10}
      orderBy:{descendingByField:"PnL"}
      where: {Block: {Time: {since_relative: {minutes_ago: 30}}}, Pair: {Token: {Id: {is: "bid:solana:8xs8TCoAMJ4zj5aeXmrDP2BechGrXLMzVyMVBxfCpump"}}}}
    ) {
      Trader {
        Address
      }
      Amount_Bought:sum(of:AmountsInUsd_Base if:{Side:{is:"Buy"}})
      Amount_Sold:sum(of:AmountsInUsd_Base if:{Side:{is:"Sell"}})
      Amount_Bought_native:sum(of:Amounts_Base if:{Side:{is:"Buy"}})
      Amount_Sold_native:sum(of:Amounts_Base if:{Side:{is:"Sell"}})
      PnL: calculate(expression:"$Amount_Sold - $Amount_Bought")
      buys:count(if:{Side:{is:"Buy"}})
      sells:count(if:{Side:{is:"Sell"}})
      Pair {
        Currency {
          Id
          Name
          Symbol
        }
        Market {
          Address
          Program
          Network
        }
        Token {
          Address
          Id
          IsNative
          Symbol
          TokenId
          Network
        }
        QuoteToken {
          Address
          Id
          IsNative
          Symbol
          TokenId
          Network
        }
      }
    }
  }
}

Similar queries