v2 equivalent query

Returns transfers on Tron, where transfer receiver is TWd4Wr…5jwb, currency smart contract is TR7NHq…Lj6t and transfer sender is TWd4Wr…5jwb: sum of transfer amount, sum of transfer amount in USD and count.

By Divyasshree · saved 13 July 2026 · Bitquery API v2

What it returns

Filters

The query

query ($address: String!, $startDate: DateTime!, $endDate: DateTime!, $minAmount: String!, $maxAmount: String!) {
  Tron(dataset: combined) {
    income: Transfers(
      where: {
        Transfer: {
          Receiver: { is: $address }
          Currency: { SmartContract: { is: "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t" } }
          Amount: { ge: $minAmount, le: $maxAmount }
        }
        Block: { Time: { since: $startDate, till: $endDate } }
      }
    ) {
      total_amount: sum(of: Transfer_Amount)
      total_amount_usd: sum(of: Transfer_AmountInUSD)
      count
    }
    expense: Transfers(
      where: {
        Transfer: {
          Sender: { is: $address }
          Currency: { SmartContract: { is: "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t" } }
          Amount: { ge: $minAmount, le: $maxAmount }
        }
        Block: { Time: { since: $startDate, till: $endDate } }
      }
    ) {
      total_amount: sum(of: Transfer_Amount)
      total_amount_usd: sum(of: Transfer_AmountInUSD)
      count
    }
  }
}

Variables

{
  "address": "TWd4WrZ9wn84f5x1hZhL4DHvk738ns5jwb",
  "startDate": "2026-07-01T00:00:00Z",
  "endDate": "2026-07-13T00:00:00Z",
  "minAmount": "100",
  "maxAmount": "10000"
}

Similar queries