Top Traders on Solana

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: Solana(dataset: combined) archive full history combined archive + realtime in one result Archive and c

By Akshat · saved 6 April 2026 · run 2 times · Bitquery API v2

What it returns

Filters

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:
#
#     Solana(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/
#

{
  Trading {
    Trades(
      limit: {count: 10}
      limitBy:{count:1 by:Trader_Address}
      orderBy: {descendingByField: "PnL"}
      where: {Block: {Time: {since_relative: {minutes_ago: 30}}}, Pair: {Market: {Network: {is: "Solana"}}}}
    ) {
      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