v1 to v2 address stats

Returns transfers and transactions: 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 6 more fields.

By Akshat · saved 14 February 2025 · run 9 times · Bitquery API v2

What it returns

The query

query MyQuery {
  EVM {
    Transfers(
      where: {Block: {Date: {since: "", till: ""}}, any: [{Transfer: {Sender: {is: ""}}}, {Transfer: {Receiver: {is: ""}}}]}
    ) {
      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: ""}, Currency: {SmartContract: {is: ""}}}}
      )
      sent_amount: sum(
        of: Transfer_Amount
        if: {Transfer: {Sender: {is: ""}, Currency: {SmartContract: {is: ""}}}}
      )
      receive_from_count: uniq(
        of: Transfer_Sender
        if: {Transfer: {Receiver: {is: ""}}}
      )
      send_to_count: uniq(of: Transfer_Receiver, if: {Transfer: {Sender: {is: ""}}})
      receive_from_currencies: uniq(
        of: Transfer_Currency_SmartContract
        if: {Transfer: {Receiver: {is: ""}}}
      )
      send_to_currencies: uniq(
        of: Transfer_Currency_SmartContract
        if: {Transfer: {Sender: {is: ""}}}
      )
      days_with_receive: uniq(of: Block_Date, if: {Transfer: {Receiver: {is: ""}}})
      days_with_sent: uniq(of: Block_Date, if: {Transfer: {Sender: {is: ""}}})
      days_with_transfers: uniq(of: Block_Date)
      send_txn_count: uniq(of: Transaction_Hash, if: {Transfer: {Sender: {is: ""}}})
      receive_txn_count: uniq(
        of: Transaction_Hash
        if: {Transfer: {Receiver: {is: ""}}}
      )
    }
    Transactions(
      where: {any: [{Transaction: {To: {is: ""}}}, {Transaction: {From: {is: ""}}}]}
    ) {
      gasValue: Fee {
        SenderFee
      }
      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: ""}}}) {
      call_txn_count:count
      Block {
        Time(minimum: Block_Date)
      }
    }
    BalanceUpdates(where:{BalanceUpdate:{Address:{is:""}}  Currency:{SmartContract:{is:""}}}){
      balance: sum(of:BalanceUpdate_Amount) 
      Currency{
        Name
        Symbol
        SmartContract
      }
    }
  }
}

Similar queries