bitcoin tx details

Returns 100 transactions and outputs on Bitcoin, where input address is bc1qgm…re02 and output address is bc1qgm…re02, sorted by block height transaction index, highest first: timestamp time, block height, input count, output count, mined value, fee value, hash and 14 more fields.

By gaurav · saved 18 July 2024 · run 5 times · Bitquery API v1

What it returns

Filters

The query

query MyQuery($network: BitcoinNetwork!, $address: String!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  bitcoin(network: $network) {
    transactions(
      options: {desc: "block.timestamp.time", limit: $limit, offset: $offset}
      date: {since: $from, till: $till}
      any: {inputAddress: {is: $address}, outputAddress: {is: $address}}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      inputCount
      outputCount
      minedValue
      feeValue
      hash
      countBigInt
      inputValue
      outputCount
      outputValue
      txVersion
      txWeight
      index
    }
    outputs(
      date: {since: $from, till: $till}
      outputAddress: {is: $address}
      options: {desc: ["block.height", "outputIndex"], limit: $limit, offset: $offset}
    ) {
      block {
        height
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
      }
      transaction {
        hash
      }
      outputIndex
      outputDirection
      value
      value_usd: value(in: USD)
    }
    inputs(
      date: {since: $from, till: $till}
      inputAddress: {is: $address}
      options: {desc: ["block.height", "transaction.index"], limit: $limit, offset: $offset}
    ) {
      block {
        height
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
      }
      outputTransaction {
        hash
        index
      }
      transaction {
        hash
        index
      }
      inputIndex
      value
      value_usd: value(in: USD)
    }
  }
}

Variables

{
  "limit": 100,
  "offset": 0,
  "network": "bitcoin",
  "address": "bc1qgmgwm6xm8hyny3pfxwqqg6lltzpl6ma0zvre02",
  "from": null,
  "till": null,
  "dateFormat": "%Y-%m-%d"
}

Similar queries