balance history

token balance of an acoount and its history

Returns balance updates on Ethereum, where balance update address is 0x3416…27c6 and currency smart contract is 0xa0b8…eb48: currency name, smart contract and sum of balance update amount.

By Akshay · saved 14 December 2024 · run 6 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(network: eth, dataset: archive) {
    BalanceUpdates(
      where: {BalanceUpdate: {Address: {is: "0x3416cf6c708da44db2624d63ea0aaef7113527c6"}}, Currency: {SmartContract: {is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}}}
    ) {
      Currency {
        Name
        SmartContract
      }
      balance: sum(of: BalanceUpdate_Amount)
      balance5dayago: sum(
        of: BalanceUpdate_Amount
        if: {Block: {Date: {till: "2024-12-09"}}}
      )
      balance10dayago: sum(
        of: BalanceUpdate_Amount
        if: {Block: {Date: {till: "2024-12-04"}}}
      )
      balance15dayago: sum(
        of: BalanceUpdate_Amount
        if: {Block: {Date: {till: "2024-11-26"}}}
      )
      BalanceUpdatebalance5dayago: sum(
        of: BalanceUpdate_Amount
        if: {Block: {Date: {till: "2024-12-09"}}}
      )
      BalanceUpdatebalance5dayago: sum(
        of: BalanceUpdate_Amount
        if: {Block: {Date: {till: "2024-12-09"}}}
      )
    }
  }
}

Similar queries