Graphql API Klaytn

Returns 10 transfers and transactions on Ethereum and klaytn, where caller is 0x87f7…5db3, address is 0x87f7…5db3 and date since 2022-04-04, sorted by count in count out, highest first: minimum of block, amount, count, gas value, maximum of block, currency name, currency symbol and balances value.

By gaurav · saved 11 April 2022 · run 3 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $address: String!, $from: ISO8601DateTime, $till: ISO8601DateTime, $limit: Int!, $offset: Int!) {
  ethereum(network: $network) {
    transfers(
      date: {since: $from, till: $till}
      amount: {gt: 0}
      any: [{receiver: {is: $address}}, {sender: {is: $address}}]
      options: {limit: $limit, offset: $offset, desc: ["count_in", "count_out"]}
    ) {
      first_transfer: minimum(of: block, get: date)
      sum_in: amount(calculate: sum, receiver: {is: $address} in: USD)
      sum_out: amount(calculate: sum, sender: {is: $address} in: USD)
      count_in: count(receiver: {is: $address})
      count_out: count(sender: {is: $address})
 			count_currencies: count(uniq: currencies receiver: {is: $address})
    }
    transactions(any: [{txTo: {is: $address}}, {txSender: {is: $address}}]) {
      gasValue
      maximum(of: block, get: date)
      minimum(of: block, get: date)
    }
    smartContractCalls(caller: {is: $address}) {
      count
      minimum(of: block, get: date)
    }
    balancedata: address(address: {is: $address}) {
      balances {
        currency {
          name
          symbol
        }
        value
      }
    }
  }
}

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "klaytn",
  "address": "0x87f7071dc67e1c5f6b02256c449669cc93375db3",
  "from": "2022-04-04",
  "till": "2022-04-11T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

Similar queries