Inbound and outbound transactions

Returns the latest 10 transactions on Ethereum and BNB Chain, where tx to is 0x3fe7…ef00 and tx sender is 0x3fe7…ef00: sender address, protocol type, contract type, to address, amount, success, block height and 9 more fields.

By gaurav · saved 13 January 2022 · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $address: String!, $startblockheight: Int!) {
  ethereum(network: $network) {
    inbound: transactions(
      options: {desc: "block.height"}
      txTo: {is: $address}
      height: {gteq: $startblockheight}
    ) {
      from: sender {
        address
        smartContract {
          protocolType
          contractType
        }
      }
      to: to {
        address
        smartContract {
          contractType
          protocolType
        }
      }
      amount
      success
      block {
        height
        timestamp {
          iso8601
        }
      }
      gasValue(txSender: {})
      gasCurrency {
        symbol
        decimals
      }
      hash
      currency {
        address
        decimals
        name
        symbol
      }
      creates {
        address
      }
    }
    outbound: transactions(
      options: {desc: "block.height", limit: 10}
      txSender: {is: $address}
      height: {gteq: $startblockheight}
    ) {
      from: sender {
        address
        smartContract {
          protocolType
          contractType
        }
      }
      to: to {
        address
        smartContract {
          contractType
          protocolType
        }
      }
      amount
      success
      block {
        height
        timestamp {
          iso8601
        }
      }
      gasValue(txSender: {})
      gasCurrency {
        symbol
        decimals
      }
      hash
      currency {
        address
        decimals
        name
        symbol
      }
      creates {
        address
      }
    }
  }
}

Variables

{
  "network": "bsc",
  "address": "0x3fe70e5905926b3d8bb4dd500a873c1545e5ef00",
  "startblockheight": 13000000
}

Similar queries