DOCS/GRAPHQL/TRANSACTIONS

Transactions

Query transaction data including inputs, outputs, and multi-currency transfers.

Get Transaction by ID

query {
  transaction(
    chainId: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"
    txid: "abc123..."
  ) {
    txid
    blockHeight
    blockHash
    timestamp
    confirmations
    valueIn
    valueOut
    fee
    isCoinbase
  }
}

Transaction with Inputs/Outputs

query {
  transaction(
    chainId: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"
    txid: "abc123..."
  ) {
    txid
    vin {
      txid
      vout
      address
      value
    }
    vout {
      n
      value
      addresses
      currencyValues
    }
  }
}

Recent Transactions

query {
  transactions(
    chainId: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"
    limit: 20
  ) {
    transactions {
      txid
      blockHeight
      timestamp
      valueOut
    }
    totalCount
    hasMore
  }
}

Transactions in Block

query {
  transactionsInBlock(
    chainId: "iJhCezBExJHvtyH3fGhNnt2NhU4Ztkf2yq"
    height: 689000
  ) {
    txid
    valueIn
    valueOut
    fee
  }
}

Transaction Type

type Transaction {
  chainId: String!
  txid: String!
  blockHeight: BigInt
  blockHash: String
  timestamp: DateTime
  confirmations: Int
  valueIn: Decimal!
  valueOut: Decimal!
  fee: Decimal
  size: Int
  isCoinbase: Boolean!
  vin: [TransactionInput!]
  vout: [TransactionOutput!]
}

type TransactionInput {
  txid: String
  vout: Int
  address: String
  value: Decimal
  coinbase: String
}

type TransactionOutput {
  n: Int!
  value: Decimal!
  addresses: [String!]
  scriptType: String
  currencyValues: JSON
}