Bitcoin tx i/o from/to address

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 17 January 2025 · run 6 times · Bitquery API v1

What it returns

Filters

The query

query ($network: BitcoinNetwork!, $limit: Int!, $offset: Int!) {
  bitcoin(network: $network) {
    inputs(
      options: {asc: "inputIndex", limit: $limit, offset: $offset}
      date: {after: "2025-01-10"}
      inputAddress: {is: "3MR59AvYXjBR9NiMNjoGnxTLr8zeEE2am8"}
    ) {
      inputIndex
      address: inputAddress {
        address
        annotation
      }
      value
      value_usd: value(in: USD)
      block {
        height
      }
      transaction {
        hash
        index
      }
      inputScript
      inputScriptType {
        annotation
        type
      }
    }
    outputs(
      date: {after: "2025-01-01"}
      options: {asc: "outputIndex", limit: $limit, offset: $offset}
      outputAddress: {is: "3MR59AvYXjBR9NiMNjoGnxTLr8zeEE2am8"}
    ) {
      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"
}

Similar queries