improved transfer API 101

Returns 25 transfers on Ethereum and Polygon, where receiver is 0x2417…6992 and sender is 0x2417…6992, sorted by block height transaction hash: currency address, decimals, currency name, currency symbol, token type, token ID, block height and 8 more fields.

By gaurav · saved 12 October 2022 · run 2 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $orderby: [String!], $address: String!, $startblockheight: Int!, $endblockheight: Int!, $limit: Int!, $offset: Int!) {
  ethereum(network: $network) {
    intransfers: transfers(
      options: {asc: $orderby, limit: $limit, offset: $offset}
      receiver: {is: $address}
      height: {gteq: $startblockheight, lteq: $endblockheight}
    ) {
      currency {
        address
        decimals
        name
        symbol
        tokenType
        tokenId
      }
      block {
        height
        timestamp {
          iso8601
        }
      }
      amount
      receiver {
        address
        smartContract {
          contractType
          protocolType
        }
      }
      sender {
        address
        smartContract {
          contractType
          protocolType
        }
      }
      count
      transaction {
        hash
      }
    }
    outtransfers: transfers(
      options: {asc: $orderby, limit: $limit, offset: $offset}
      sender: {is: $address}
      height: {gteq: $startblockheight, lteq: $endblockheight}
    ) {
      currency {
        address
        decimals
        name
        symbol
        tokenType
        tokenId
      }
      block {
        height
        timestamp {
          iso8601
        }
      }
      amount
      receiver {
        address
        smartContract {
          contractType
          protocolType
        }
      }
      sender {
        address
        smartContract {
          contractType
          protocolType
        }
      }
      count
      transaction {
        hash
      }
    }
  }
}

Variables

{
  "network": "matic",
  "orderby": [
    "block.height",
    "transaction.hash"
  ],
  "address": "0x24174f21e77a210cbb4fd1dd3801c73821476992",
  "limit": 25,
  "offset": 0,
  "startblockheight": 30345414,
  "endblockheight": 30595413
}

Similar queries