income outcome sum for an address on tron

Returns transfers on Tron, where transfer receiver is TGVF6u…kfnr, currency smart contract is TR7NHq…Lj6t and transfer sender is TGVF6u…kfnr: sum of transfer amount and count.

By Divyasshree · saved 18 March 2026 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query ($address: String!, $startDate: DateTime!, $endDate: DateTime!, $minAmount: String!, $maxAmount: String!) {
  Tron(dataset: archive, aggregates: yes) {
    income: Transfers(
      where: {Transfer: {Receiver: {is: $address}, Currency: {SmartContract: {is: "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"}}, Amount: {ge: $minAmount, le: $maxAmount}}, Block: {Time: {since: $startDate, till: $endDate}}, TransactionStatus: {Success: true}}
    ) {
      amount: sum(of: Transfer_Amount)
      count: count
    }
    expense: Transfers(
      where: {Transfer: {Sender: {is: $address}, Currency: {SmartContract: {is: "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"}}}, Block: {Time: {since: $startDate, till: $endDate}}, TransactionStatus: {Success: true}}
    ) {
      amount: sum(of: Transfer_Amount)
      count: count
    }
  }
}

Variables

{
  "address": "TGVF6u7xp2mtNwHLnvDuHhpfPFbrtEkfnr",
  "startDate": "2025-03-18T00:00:00Z",
  "endDate": "2025-06-18T23:59:59Z",
  "minAmount": "0.01",
  "maxAmount": "9999999"
}

Similar queries