getERC20Transfers

Returns the latest 20 transfers on Ethereum, where currency smart contract is 0xdac1…1ec7, transfer sender is 0xd8dA…6045 and transfer receiver is 0xd8dA…6045: block time, transfer amount, amount in USD, currency symbol, receiver and sender.

By Jose · saved 18 September 2024 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query getERC20Transfers(
  $dataset: dataset_arg_enum!,
  $network: evm_network!,
  $limit: Int!,
  $tokenAddress: String!,
  $wallet: String!
) {
  EVM(dataset: $dataset, network: $network) {
    senderSide: Transfers(
      limit: {count: $limit}
      orderBy: {descending: Block_Time}
      where: {
        Transfer: {
          Currency: {
            SmartContract: { is: $tokenAddress }
          }
          Sender: {is: $wallet }
        }
      }
    ) {
      Block {
        Time
      }
      Transfer {
        Amount
        AmountInUSD
        Currency {
          Symbol
        }
        Receiver
        Sender
      }
    }
    receiverSide: Transfers(
      limit: {count: $limit}
      orderBy: {descending: Block_Time}
      where: {
        Transfer: {
          Currency: {
            SmartContract: { is: $tokenAddress }
          }
          Receiver: {is: $wallet}
        }
      }
    ) {
      Block {
        Time
      }
      Transfer {
        Amount
        AmountInUSD
        Currency {
          Symbol
        }
        Receiver
        Sender
      }
    }
  }
}

Variables

{
  "dataset": "archive",
  "network": "eth",
  "limit": 20,
  "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
  "wallet": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}

Similar queries