gettxout

The gettxout RPC method returns details about an unspent transaction output (UTXO). This method can be used to check if a specific transaction output is still unspent and obtain its details such as the value and scriptPubKey.


Parameters

parameter
description
txid
The transaction ID of the output. Example: "a12345abcdef67890bcdef1234567890abcdef1234567890abcdef1234567890"
n
The index of the output within the transaction (vout). Example: 1
include_mempool
Whether to include the mempool. Set to false to only check for outputs confirmed in the blockchain. Example: True
Return Object

The return object contains the following fields:

name
description
bestblock
The hash of the block at the tip of the blockchain.
confirmations
The number of confirmations for the transaction. -1 if the transaction is not yet confirmed and in the mempool.
value
The value of the output in BTC.
scriptPubKey
Information about the output's scriptPubKey: asm: The assembly representation of the script. hex: The hex representation of the script. type: The type of the script (e.g., pubkeyhash, scripthash). addresses: The Bitcoin addresses associated with this output.
coinbase
Whether the transaction is a coinbase transaction.
version
The transaction version.
height
The height of the block containing this output.
Request Example
Bitcoin Get TX Out Request

Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?