Inbound transfers in native currency

Returns the latest transfer on Ethereum, where transfer receiver is 0xc02a…6cc2, currency smart contract is 0xc02a…6cc2 and block date since 2023-07-25: chain ID, block date, count, sum of transfer amount, currency symbol, smart contract and currency name.

By Nadia · saved 17 January 2024 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $address: String!, $from: String, $till: String) {
  EVM(dataset: combined, network: $network) {
    Transfers(
      where: {Block: {Date: {since: $from, till: $till}}, Transfer: {Receiver: {is: $address}, Currency: {Native: true}}}
      orderBy: {descending: Block_Date}
    ) {
      ChainId
      Block {
        Date
      }
      count
      sum(of: Transfer_Amount)
    }
    token_info: Transfers(
      where: {Transfer: {Currency: {SmartContract: {is: $address}}}}
      limit: {count: 1}
    ) {
      Transfer {
        Currency {
          Symbol
          SmartContract
          Name
        }
      }
    }
  }
}

Variables

{
  "limit": 10,
  "network": "eth",
  "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "from": "2023-07-25",
  "till": "2023-07-25"
}

Similar queries