Ethereum_Token_Holders

Returns token holders on Ethereum, where holder address is not 0x and balance amount is above 0, sorted by balance amount, highest first: holder address, balance amount, currency symbol, currency name, native, protocol name, decimals and unique of holder address.

By Naresh · saved 15 August 2024 · Bitquery API v2

What it returns

Filters

The query

 query FETCH_ETHEREUM_TOKEN_BALANCES($address: String!,
                                        $till_date: String!,
                                        $top_n_count: Int) {
    EVM(network: eth, dataset: archive) {
    
    # top 100 holders
    token_holders: TokenHolders(
      date: $till_date
      tokenSmartContract: $address
      where: {Balance: {Amount: {gt: "0"}}, Holder: {Address: {notIn: ["0x"]}}}
      orderBy: {descending: Balance_Amount}
       limit: {count: $top_n_count}
    ) {
      Holder {
        Address
      }
      Balance {
        Amount
      }
      Currency {
        Symbol
        Name
        Native
        ProtocolName
        Decimals
      }
      }
      
    # token holders count and token supply
    token_metrics: TokenHolders(
      date: $till_date
      tokenSmartContract: $address
      where: {Balance: {Amount: {gt: "0"}}}
    ) 
    {
     token_holders_count: uniq(of: Holder_Address, method: exact)
    }
  }
}

Similar queries