Blockchain RPC Methods
Blockchain RPCs provide access to Bitcoin blockchain data, including blocks, transactions, chain state, and UTXO information.Chain Information
getblockchaininfo
Returns comprehensive information about the current state of the blockchain.Current network name (main, test, signet, regtest)
Current number of blocks processed
Current number of headers validated
Hash of the best (tip) block
Current proof-of-work difficulty
Block time of the best block (Unix timestamp)
Median time for the current best block
Estimate of verification progress (0 to 1)
Total amount of work in active chain (hex)
Estimated size of the block and undo files on disk
Whether the blocks are subject to pruning
Any network and blockchain warnings
getblockcount
Returns the height of the most-work fully-validated chain.The current block count (genesis block has height 0)
getbestblockhash
Returns the hash of the best (tip) block in the most-work fully-validated chain.The block hash (hex-encoded)
getdifficulty
Returns the proof-of-work difficulty as a multiple of the minimum difficulty.The current difficulty
Block Operations
getblock
Returns information about a block at the given hash or height.Block hash (same as provided)
Number of confirmations (-1 if block is not in main chain)
Block height
Block version
Merkle root hash
Block time (Unix timestamp)
Median time past
Block nonce
Difficulty target bits (hex)
Difficulty
Expected chain work (hex)
Transaction IDs (verbosity 1) or full transaction objects (verbosity 2+)
Hash of previous block
Hash of next block (if available)
getblockhash
Returns the hash of the block at the given height.The block hash at the specified height
getblockheader
Returns information about a block header.getblockstats
Computes per-block statistics for a given window.Average fee in the block
Average feerate (satoshis per virtual byte)
Average transaction size
Block hash
Block height
Maximum fee in the block
Maximum feerate
Minimum transaction size
Total fees in the block
Number of transactions (excluding coinbase)
Transaction Operations
gettxout
Returns details about an unspent transaction output (UTXO).Hash of the block at tip of chain
Number of confirmations
Transaction value in BTC
Script pubkey information including asm, hex, type, and address
Whether this is a coinbase transaction
Returns
null if the transaction output is spent or doesn’t exist.gettxoutsetinfo
Returns statistics about the unspent transaction output set.Block height
Best block hash
Number of unspent transaction outputs
Total amount in BTC
getrawtransaction
Returns raw transaction data.Chain State Queries
getchaintips
Returns information about all known chain tips.Height of the chain tip
Block hash of the tip
Length of branch connecting tip to main chain (0 for main chain)
Status: active, valid-fork, valid-headers, headers-only, invalid
getchaintxstats
Computes statistics about the total number and rate of transactions in the chain.verifychain
Verifies blockchain database integrity.Whether verification passed