Skip to main content

gettxoutsetinfo

Overview

The 'gettxoutsetinfo' RPC method returns detailed information about the set of unspent transaction outputs (UTXOs).

Request

wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY' \
--body-data '{"jsonrpc":"2.0","id":1,"method":"gettxoutsetinfo","params": [ ]}' \
'https://bitcoin-mainnet.node.coinapi.io'

Request Parameters

  • hash_type (string)
    • default: hash_serialized_2
    • Description: Specifies the type of UTXO set hash to be calculated.
    • Options:
      • "hash_serialized_2": Computes a serialized hash which helps in verifying the UTXO set's integrity by comparing it with other nodes.
      • "none": Does not calculate a hash.

Response

{
"result": {
"height": 687293,
"bestblock": "00000000000000000008adb1c65c7358b2989d183a5e875a3b853f12ac4b89d7",
"txouts": 9552849,
"bogosize": 676484713,
"hash_serialized_2": "3e4f22d8fd4ea1c1fb5da1c3f6d0297b12f1f602699ada01e9ad608aa13f7969",
"total_amount": 18546728.293476,
"transactions": 5362819,
"disk_size": 25467893456,
"error": null
},
"id": "curltest",
"status": "success"
}

A JSON object containing the following fields:

  • result: An object encapsulating the response data with the following attributes:
    • height: Indicates the height of the current block in the blockchain.
    • bestblock: The hash of the most recent block at the tip of the blockchain.
    • txouts: Represents the number of unspent transaction outputs.
    • bogosize: A metric representing the UTXO set size; however, it doesn't convey any meaningful information.
    • hash_serialized_2: This field contains the serialized hash value (only appears if the hash_type is set to 'hash_serialized_2'). It assists in verifying the integrity of the UTXO set through comparison with other nodes.
    • total_amount: The cumulative value (in BTC) of all unspent outputs.
    • transactions: Denotes the number of transactions with unspent outputs.
    • disk_size: The estimated size of the chainstate on the disk in bytes.
    • error: If an error occurs during the execution, this field will contain the error message; otherwise, it remains empty.