common token holders for multiple tokens

Returns 10 balance updates, where currency smart contract is 0xfa3e…965e or 0x0645…6fb8: balance update address and sum of balance update amount.

By Aleksey · saved 14 October 2023 · run 7 times · Bitquery API v2

What it returns

Filters

The query

query($token1: String!, $token2: String!) {
  EVM(dataset: archive) {
    BalanceUpdates( 
      limit: {count: 10}
      where: {
        Currency: {
          SmartContract: {
            in: [$token1,$token2]
          }
        }
      }
    ) {
      BalanceUpdate {
        Address
      }
    	token1: sum(of: BalanceUpdate_Amount if: {Currency: {SmartContract: {is: $token1}}} selectWhere: {gt: "0"})
    	token2: sum(of: BalanceUpdate_Amount if: {Currency: {SmartContract: {is: $token2}}} selectWhere: {gt: "0"})
    }
	}
}

Variables

{
  "token1": "0xfa3e941d1f6b7b10ed84a0c211bfa8aee907965e",
  "token2": "0x06450dee7fd2fb8e39061434babcfc05599a6fb8",
  "date": "2025-11-22"
}

Similar queries