decoderawtransaction

Decodes a serialized, hex-encoded Bitcoin transaction. Returns detailed information about inputs, outputs, size, witness data, etc.

Path parameters

apiKeystringRequiredDefaults to docs-demo

Request

This endpoint expects an object.
hexstringstringRequiredformat: "^[a-fA-F0-9]+$"
The transaction hex string to decode.
iswitnessbooleanOptional
Indicates whether the transaction includes witness data. If omitted, heuristic decoding is applied.

Response

A JSON object representing the decoded transaction.
txidstring or nullformat: "^[a-fA-F0-9]{64}$"

A 64-character hex string identifying a transaction.

hashstring or null

The transaction hash (differs from txid for witness transactions).

sizeinteger or null
vsizeinteger or null
weightinteger or null
versioninteger or null
locktimeinteger or null
vinlist of objects or null
voutlist of objects or null