Bitcoin tx i/o

The provided query retrieves information about the inputs and outputs of a specific Bitcoin transaction, including addresses, values in Bitcoin and USD, and transaction directions.

By Divyasshree · saved 16 January 2025 · run 5 times · Bitquery API v1

What it returns

Filters

The query

query ($network: BitcoinNetwork!, $hash: String!, $limit: Int!, $offset: Int!) {
  bitcoin(network: $network) {
    inputs(
      txHash: {is: $hash}
      options: {asc: "inputIndex", limit: $limit, offset: $offset}
      date: {after: "2025-01-10"}
    ) {
      inputIndex
      address: inputAddress {
        address
        annotation
      }
      value
      value_usd: value(in: USD)
      block {
        height
      }
      transaction {
        hash
        index
      }
      inputScript
      inputScriptType {
        annotation
        type
      }
    }
    outputs(
      txHash: {is: $hash}
      date: {after: "2025-01-01"}
      options: {asc: "outputIndex", limit: $limit, offset: $offset}
    ) {
      outputIndex
      address: outputAddress {
        address
        annotation
      }
      value
      value_usd: value(in: USD)
      outputDirection
      outputScriptType {
        type
        annotation
      }
      outputScript
      reqSigs
      transaction {
        index
      }
      block {
        height
      }
    }
  }
}

Variables

{
  "limit": 100,
  "offset": 0,
  "network": "bitcoin",
  "hash": "dc4ce1a0584eac603532466fa76491fa4cce22f65b5fa266543e6140d96cf164"
}

Similar queries