Transfer in and out in USD

Returns 10 address details and transfers on Ethereum, where address is 0x2702…6f6b, receiver is 0x2702…6f6b and sender is 0x2702…6f6b, sorted by currency symbol: balance, amount, currency address, currency symbol, token type and date date.

By Divyasshree N · saved 16 February 2023 · run 1 time · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $address: String!, $limit: Int!, $offset: Int!) {
  ethereum(network: $network) {
    address(address: {is: $address}) {
      balance
      usd: balance(in: USD)
    }
    transfers_in: transfers(
      amount: {gt: 0}
      receiver: {is: $address}
      options: {limit: $limit, offset: $offset, asc: "currency.symbol"}
    ) {
      sum_in: amount(calculate: sum)
      sum_in_usd: amount(calculate: sum, in: USD)
      currency {
        address
        symbol
        tokenType
      }
      date {
        date
      }
    }
    transfers_out: transfers(
      amount: {gt: 0}
      sender: {is: $address}
      options: {limit: $limit, offset: $offset, asc: "currency.symbol"}
    ) {
      sum_in: amount(calculate: sum)
      sum_in_usd: amount(calculate: sum, in: USD)
      currency {
        address
        symbol
        tokenType
      }
      date {
        date
      }
    }
  }
}

Variables

{
  "address": "0x27026e2f4dc19b55708fc62852afad3407456f6b",
  "limit": 10,
  "offset": 0,
  "network": "ethereum"
}

Similar queries