Improved transfer API_smart_contract_ordered

improved transfer API

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

By pablo · saved 12 October 2022 · run 1 time · 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",
    "block.timestamp.iso8601",
    "receiver.address",
    "sender.address",
    "receiver.smartContract.contractType"  
  ],
  "address": "0x24174f21e77a210cbb4fd1dd3801c73821476992",
  "limit": 25,
  "offset": 0,
  "startblockheight": 30345414,
  "endblockheight": 30595413
}

Similar queries