v2 address stats

Returns transfers and transactions, where transfer sender is 0xe25F…04b4, call from is 0xe25F…04b4 and balance update address is 0xe25F…04b4: block time, sum of transfer amount, unique of transfer sender, unique of transfer receiver, unique of transfer currency smart contract, unique of block date, unique of transaction hash and 5 more fields.

By Akshat · saved 26 February 2025 · run 8 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery($sender: String, $receiver: String, $since: DateTime,$till:DateTime, $currency: String) {
  EVM(dataset: combined) {
    Transfers(
      where: {Block: {Time: {since: $since, till: $till}}, Transfer:{Currency:{SmartContract:{is:$currency}}, Sender:{is: $sender}}}
    ) {
      Block {
        first_transfer_at: Time(minimum: Block_Time)
        last_transfer_at: Time(maximum: Block_Time)
      }
      receive_amount: sum(
        of: Transfer_Amount
        if: {Transfer: {Receiver: {is: $receiver}}}
      )
      sent_amount: sum(
        of: Transfer_Amount
        if: {Transfer: {Sender: {is: $sender}}}
      )
      receive_from_count: uniq(
        of: Transfer_Sender
        if: {Transfer: {Receiver: {is: $receiver}}}
      )
      send_to_count: uniq(
        of: Transfer_Receiver
        if: {Transfer: {Sender: {is: $sender}}}
      )
      receive_from_currencies: uniq(
        of: Transfer_Currency_SmartContract
        if: {Transfer: {Receiver: {is: $receiver}}}
      )
      send_to_currencies: uniq(
        of: Transfer_Currency_SmartContract
        if: {Transfer: {Sender: {is: $sender}}}
      )
      days_with_receive: uniq(
        of: Block_Date
        if: {Transfer: {Receiver: {is: $receiver}}}
      )
      days_with_sent: uniq(of: Block_Date, if: {Transfer: {Sender: {is: $sender}}})
      days_with_transfers: uniq(of: Block_Date)
      send_txn_count: uniq(
        of: Transaction_Hash
        if: {Transfer: {Sender: {is: $sender}}}
      )
      receive_txn_count: uniq(
        of: Transaction_Hash
        if: {Transfer: {Receiver: {is: $receiver}}}
      )
    }
    Transactions(
      where: {any: [{Transaction: {To: {is: $receiver}}}, {Transaction: {From: {is: $sender}}}]}
    ) {
      Block {
        first_transaction_at: Time(minimum: Block_Time)
        last_transaction_at: Time(maximum: Block_Time)
      }
      days_with_transactions: uniq(of: Block_Date)
    }
    Calls(where: {Call: {From: {is: $sender}}}) {
      call_txn_count: count
      Block {
        Time(minimum: Block_Date)
      }
    }
    BalanceUpdates(
      where: {BalanceUpdate: {Address: {is: $sender}}, Currency: {SmartContract: {is: $currency}}}
    ) {
      balance: sum(of: BalanceUpdate_Amount)
      Currency {
        Name
        Symbol
        SmartContract
      }
    }
  }
}

Variables

{
  "sender":"0xe25F68282AFB652A9573D9C5c730f7C7c59c04b4",
  "receiver": "0xe25F68282AFB652A9573D9C5c730f7C7c59c04b4",
  "since":"2021-08-01T00:00:00Z",
  "till": "2022-05-01T00:00:00Z",
  "currency": "0x"
}

Similar queries