Top Traders by PnL of a specific tron pool

Returns 10 trades, where market address is TThJt8…ys9x, sorted by pn l, highest first: trader address, sum of amounts in USD base, sum of amounts base, calculate and count.

By Akshat · saved 9 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: {Market: {Address: {is: "TThJt8zaJzJMhCEScH7zWKnp5buVZqys9x"}}}}
    ) {
      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"}})
      
    }
  }
}

Similar queries