address: 1st, last, balance update

Returns one balance update, where balance update address is 0x9522…Afe5 and currency smart contract is 0x4c9e…68b3: sum of balance update amount, currency name, currency symbol, smart contract, transfer amount, amount in USD, decimals and 16 more fields.

By Divyasshree · saved 24 February 2025 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM {
    BalanceUpdates(
      where: {BalanceUpdate: {Address: {is: "0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5"}}, Currency: {SmartContract: {is: ""}}}
    ) {
      balance: sum(of: BalanceUpdate_Amount)
      Currency {
        Name
        Symbol
        SmartContract
      }
    }
    Last_transfer: Transfers(
      limit: {count: 1}
      orderBy: [{descending: Block_Time}, {descending: Transaction_Index}, {descending: Transfer_Index}]
      where: {Transfer: {Currency: {SmartContract: {is: "0x4c9edd5852cd905f086c759e8383e09bff1e68b3"}}}}
    ) {
      Transfer {
        Amount
        AmountInUSD
        Currency {
          Name
          Symbol
          SmartContract
          Decimals
        }
        Data
        Id
        Index
        Success
        Type
        URI
        Sender
        Receiver
      }
      Call {
        From
        Value
        To
        Signature {
          Name
          Signature
        }
      }
      Log {
        SmartContract
        Signature {
          Name
        }
      }
      TransactionStatus {
        Success
      }
      Transaction {
        Hash
        From
        To
      }
      Block {
        Time
        Number
      }
    }
    First_transfer: Transfers(
      limit: {count: 1}
      orderBy: [{ascending: Block_Time}, {ascending: Transaction_Index}, {ascending: Transfer_Index}]
      where: {Transfer: {Currency: {SmartContract: {is: "0x4c9edd5852cd905f086c759e8383e09bff1e68b3"}}}}
    ) {
      Transfer {
        Amount
        AmountInUSD
        Currency {
          Name
          Symbol
          SmartContract
          Decimals
        }
        Data
        Id
        Index
        Success
        Type
        URI
        Sender
        Receiver
      }
      Call {
        From
        Value
        To
        Signature {
          Name
          Signature
        }
      }
      Log {
        SmartContract
        Signature {
          Name
        }
      }
      TransactionStatus {
        Success
      }
      Transaction {
        Hash
        From
        To
      }
      Block {
        Time
        Number
      }
    }
  }
}

Similar queries