Skip to main content

gettxout RPC Method

Returns details about an unspent transaction output.

Updated on
Oct 4, 2023

gettxout RPC Method

Parameters

txid
string
REQUIRED
The transaction id
n
numeric
REQUIRED
Vout number
include_mempool
boolean
default=true. Whether to include the mempool

Returns

bestblock
The block hash at the tip of the chain
confirmations
The number of confirmations received for the transaction
value
The transaction value in BTC
scriptPubKey
A JSON object containing information about the PubKey script
asm
The script public key in the form of string
hex
The hexadecimal of the transaction
reqSigs
Number of required signatures
type
The type of script, eg pubkeyhash, multisig
addresses
A JSON array of Bitcoin addresses
str
A Bitcoin address
coinbase
It is true if the transaction output belongs to a coinbase transaction otherwise it's false for all other transactions
Request
1
curl https://docs-demo.btc.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method": "gettxout", "params": ["txid", 1]}'
5
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free