Skip to main content

getrawtransaction RPC Method

Returns the raw transaction data.

Updated on
Apr 29, 2026

Parameters

txid
string
REQUIRED

The transaction id

verbose
integer

(default: 0) A numeric parameter that can take one of the following values: '0' for hex-encoded data, '1' for JSON object

blockhash
string

The block in which to look for the transaction

Returns

result
string | object

Hex-encoded transaction when verbose is 0, or a JSON transaction object when verbose is 1

in_active_chain
boolean

Whether specified block is in the active chain or not (only present with explicit 'blockhash' argument)

hex
string

The serialized, hex-encoded data for 'txid'

height
integer

The block height containing the transaction

confirmations
integer

The number of confirmed transaction in the block

vin
array

A JSON array. Each element in the array serves as a transaction's input vector (vin).

coinbase
string

The coinbase data (for coinbase transactions)

sequence
integer

The sequence number of the script

txid
string

The transaction id

vout
integer

The output number

scriptSig
object

The script's signature

asm
string

The script's public key in the form of a string

hex
string

The hex-encoded script data

vout
array

A JSON array containing tx output information

value
number

The value in ZEC

valueZat
integer

The value in zatoshis

n
integer

The output index

scriptPubKey
object

A JSON object containing information about the PubKey script

asm
string

The script public key in the form of string

hex
string

The hex of the script's public key in string format

type
string

The type of script, e.g. pubkeyhash, multisig, scripthash

addresses
array

The Zcash addresses

str
string

The Zcash address

vShieldedSpend
array

An array of Sapling shielded spend descriptions

vShieldedOutput
array

An array of Sapling shielded output descriptions

vjoinsplit
array

An array of Sprout joinsplit descriptions

orchard
object

Orchard transaction data

actions
array

An array of Orchard actions

valueBalance
number

The net value of Orchard pool changes in ZEC

valueBalanceZat
integer

The net value of Orchard pool changes in zatoshis

valueBalance
number

The net value of Sapling pool changes in ZEC

valueBalanceZat
integer

The net value of Sapling pool changes in zatoshis

size
integer

The transaction size

time
integer

Same as 'blocktime'

txid
string

The transaction id

overwintered
boolean

Whether the transaction uses the Overwinter format

version
integer

The transaction version

locktime
integer

The transaction locktime

blockhash
string

The block hash

blocktime
integer

The block time expressed in UNIX epoch time

Request
Response
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": {
5
"in_active_chain": true,
6
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0402e80300ffffffff029017fb0200000000232103d2b11b34418e65f8358fb89bee21432b6505eb860614560ce7180fa362f8d965ac20bcbe000000000017a9147d46a730d31f97b1930d3368a967c309bd4d136a8700000000",
7
"height": 1000,
8
"confirmations": 3322590,
9
"vin": [
10
{
11
"coinbase": "02e80300",
12
"sequence": 4294967295
13
}
14
],
15
"vout": [
16
{
17
"value": 0.5001,
18
"valueZat": 50010000,
19
"n": 0,
20
"scriptPubKey": {
21
"asm": "03d2b11b34418e65f8358fb89bee21432b6505eb860614560ce7180fa362f8d965 OP_CHECKSIG",
22
"hex": "2103d2b11b34418e65f8358fb89bee21432b6505eb860614560ce7180fa362f8d965ac",
23
"type": "pubkey"
24
}
25
},
26
{
27
"value": 0.125,
28
"valueZat": 12500000,
29
"n": 1,
30
"scriptPubKey": {
31
"asm": "OP_HASH160 7d46a730d31f97b1930d3368a967c309bd4d136a OP_EQUAL",
32
"hex": "a9147d46a730d31f97b1930d3368a967c309bd4d136a87",
33
"reqSigs": 1,
34
"type": "scripthash",
35
"addresses": [
36
"t3Vz22vK5z2LcKEdg16Yv4FFneEL1zg9ojd"
37
]
38
}
39
}
40
],
41
"vShieldedSpend": [],
42
"vShieldedOutput": [],
43
"vjoinsplit": [],
44
"orchard": {
45
"actions": [],
46
"valueBalance": 0,
47
"valueBalanceZat": 0
48
},
49
"valueBalance": 0,
50
"valueBalanceZat": 0,
51
"size": 131,
52
"time": 1477750705,
53
"txid": "2a03a4110c62047af28a44ab78ec9af9d020c9b8128051b46d89c22cd34777d5",
54
"overwintered": false,
55
"version": 1,
56
"locktime": 0,
57
"blockhash": "0000000b70480327694608408728c65c1f1a300bfe705b01baca0f5504092e1b",
58
"blocktime": 1477750705
59
}
60
}
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": {
5
"in_active_chain": true,
6
"hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0402e80300ffffffff029017fb0200000000232103d2b11b34418e65f8358fb89bee21432b6505eb860614560ce7180fa362f8d965ac20bcbe000000000017a9147d46a730d31f97b1930d3368a967c309bd4d136a8700000000",
7
"height": 1000,
8
"confirmations": 3322590,
9
"vin": [
10
{
11
"coinbase": "02e80300",
12
"sequence": 4294967295
13
}
14
],
15
"vout": [
16
{
17
"value": 0.5001,
18
"valueZat": 50010000,
19
"n": 0,
20
"scriptPubKey": {
21
"asm": "03d2b11b34418e65f8358fb89bee21432b6505eb860614560ce7180fa362f8d965 OP_CHECKSIG",
22
"hex": "2103d2b11b34418e65f8358fb89bee21432b6505eb860614560ce7180fa362f8d965ac",
23
"type": "pubkey"
24
}
25
},
26
{
27
"value": 0.125,
28
"valueZat": 12500000,
29
"n": 1,
30
"scriptPubKey": {
31
"asm": "OP_HASH160 7d46a730d31f97b1930d3368a967c309bd4d136a OP_EQUAL",
32
"hex": "a9147d46a730d31f97b1930d3368a967c309bd4d136a87",
33
"reqSigs": 1,
34
"type": "scripthash",
35
"addresses": [
36
"t3Vz22vK5z2LcKEdg16Yv4FFneEL1zg9ojd"
37
]
38
}
39
}
40
],
41
"vShieldedSpend": [],
42
"vShieldedOutput": [],
43
"vjoinsplit": [],
44
"orchard": {
45
"actions": [],
46
"valueBalance": 0,
47
"valueBalanceZat": 0
48
},
49
"valueBalance": 0,
50
"valueBalanceZat": 0,
51
"size": 131,
52
"time": 1477750705,
53
"txid": "2a03a4110c62047af28a44ab78ec9af9d020c9b8128051b46d89c22cd34777d5",
54
"overwintered": false,
55
"version": 1,
56
"locktime": 0,
57
"blockhash": "0000000b70480327694608408728c65c1f1a300bfe705b01baca0f5504092e1b",
58
"blocktime": 1477750705
59
}
60
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free