Token Holder Count

Returns 1000 balance updates and transfers on Ethereum, where currency smart contract is 0x582d…def1, sorted by holdings, highest first: balance update address, sum of balance update amount and sum of transfer amount.

By chantha · saved 18 July 2025 · Bitquery API v2

What it returns

Filters

The query

query GetTokenHolders($contract_address: String) {
  EVM(dataset: combined, network: eth) {
    # Top holders
    Holders: BalanceUpdates(
      where: {Currency: {SmartContract: {is: $contract_address}}}
      orderBy: {descendingByField: "holdings"}
      limit: {count: 1000}
    ) {
      BalanceUpdate {
        Address
      }
      holdings: sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0"})
    }
    
    # Total supply
    Supply: Transfers(
      where: {Transfer: {Currency: {SmartContract: {is: $contract_address}}, Success: true}}
    ) {
      minted: sum(
        of: Transfer_Amount
        if: {Transfer: {Sender: {is: "0x0000000000000000000000000000000000000000"}}}
      )
      burned: sum(
        of: Transfer_Amount
        if: {Transfer: {Receiver: {is: "0x0000000000000000000000000000000000000000"}}}
      )
    }
  }
}

Variables

{
  "contract_address": "0x582d872a1b094fc48f5de31d3b73f2d9be47def1",
  "pool_address": "0x6a9c4fc2b35ee398e7a0e75d982872466ba93cb8",
  "start_date": "2024-01-01T00:00:00Z",
  "end_date": "2024-12-31T23:59:59Z"
}

Similar queries