bitcoind.app
CommandsGuidesContact ↗
bitcoind.app
BITCOIN CORE RPC REFERENCE

Every bitcoind RPC command. Documented, searchable, with ready-to-use code snippets.

Blockchain

27
getbestblockhash
Returns the hash of the best (tip) block in the most-work fully-validated chain.
getblock
Returns data about a block given its hash. Verbosity controls the detail level.
getblockchaininfo
Returns an object containing various state info regarding blockchain processing.
getblockcount
Returns the height of the most-work fully-validated chain. The genesis block has height 0.
getblockfilter
Retrieve a BIP 157 content filter for a particular block.
getblockhash
Returns hash of block at given height in the most-work fully-validated chain.
getblockheader
Returns information about a block header given its hash.
getblockstats
Compute per-block statistics for a given window. Useful for fee analysis and block metrics.
getchaintips
Return information about all known tips in the block tree, including the main chain and orphaned branches.
getchaintxstats
Compute statistics about the total number and rate of transactions in the chain.
getdifficulty
Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
getmempoolancestors
If txid is in the mempool, returns all in-mempool ancestors.
getmempooldescendants
If txid is in the mempool, returns all in-mempool descendants.
getmempoolentry
Returns mempool data for given transaction.
getmempoolinfo
Returns details on the active state of the TX memory pool.
getrawmempool
Returns all transaction ids in memory pool.
gettxout
Returns details about an unspent transaction output (UTXO).
gettxoutproof
Returns a hex-encoded proof that one or more transactions were included in a block.
gettxoutsetinfo
Returns statistics about the unspent transaction output set. Note: may take a long time.
preciousblock
Treats a block as if it were received before others with the same work. Cannot be used to undo a previous call.
pruneblockchain
Prune blockchain up to specified height or unix timestamp.
savemempool
Dumps the mempool to disk in the data directory.
verifychain
Verifies blockchain database.
verifytxoutproof
Verifies that a proof points to a transaction in a block.
getdeploymentinfo
Returns an object containing various state info regarding deployments of consensus changes.
scanblocks
Return relevant blockhashes for given descriptors. Requires -blockfilterindex.
scantxoutset
Scan the UTXO set for entries that match certain output descriptors.

Control

6
getmemoryinfo
Returns an object containing information about memory usage.
getrpcinfo
Returns details of the RPC server.
help
List all commands, or get help for a specified command.
logging
Gets and sets the logging configuration.
stop
Request a graceful shutdown of Bitcoin Core.
uptime
Returns the total uptime of the server in seconds.

Generating

3
generateblock
Mine a block with a set of ordered transactions immediately to a specified address or descriptor.
generatetoaddress
Mine blocks immediately to a specified address (for regtest mode).
generatetodescriptor
Mine blocks immediately to a specified descriptor (for regtest mode).

Mining

6
getblocktemplate
Returns data needed to construct a block to work on. Used by mining software.
getmininginfo
Returns a json object containing mining-related information.
getnetworkhashps
Returns the estimated network hashes per second.
prioritisetransaction
Accepts the transaction into mined blocks at a higher (or lower) priority.
submitblock
Attempts to submit new block to network.
submitheader
Decode the given hexdata as a header and submit it as a candidate chain tip if valid.

Network

14
addnode
Attempts to add or remove a node from the addnode list, or try a connection once.
clearbanned
Clear all banned IPs.
disconnectnode
Immediately disconnects from the specified peer node.
getaddednodeinfo
Returns information about the given added node, or all added nodes.
getconnectioncount
Returns the number of connections to other nodes.
getnettotals
Returns information about network traffic, including bytes in, bytes out, and current time.
getnetworkinfo
Returns an object containing various state info regarding P2P networking.
getnodeaddresses
Return known addresses which can potentially be used to find new nodes in the network.
getpeerinfo
Returns data about each connected network node.
listbanned
List all manually banned IPs/Subnets.
ping
Requests that a ping be sent to all other nodes, to measure ping time.
setban
Attempts to add or remove an IP/Subnet from the banned list.
setnetworkactive
Disable/enable all p2p network activity.
addpeeraddress
Add the address of a peer to the address manager to be tried during connection attempts. Primarily for testing.

Rawtransactions

16
analyzepsbt
Analyzes and provides information about the current status of a PSBT and its inputs.
combinepsbt
Combine multiple partially signed Bitcoin transactions into one transaction.
combinerawtransaction
Combine multiple partially signed transactions into one transaction.
converttopsbt
Converts a network serialized transaction to a PSBT.
createpsbt
Creates a transaction in the Partially Signed Transaction format.
createrawtransaction
Create a transaction spending the given inputs and creating new outputs. Returns hex-encoded raw transaction.
decodepsbt
Return a JSON object representing the serialized, base64-encoded PSBT.
decoderawtransaction
Return a JSON object representing the serialized, hex-encoded transaction.
decodescript
Decode a hex-encoded script.
finalizepsbt
Finalize the inputs of a PSBT. Signs and finalizes where possible.
getrawtransaction
Return the raw transaction data. By default returns hex. Use verbose for JSON.
joinpsbts
Joins multiple distinct PSBTs with different inputs and outputs into one PSBT.
sendrawtransaction
Submit a raw transaction (serialized, hex-encoded) to local node and network.
signrawtransactionwithkey
Sign inputs for raw transaction (serialized, hex-encoded) using given private keys.
testmempoolaccept
Returns result of mempool acceptance tests for raw transactions without adding to mempool.
utxoupdatepsbt
Updates all segwit inputs and outputs in a PSBT with data from output descriptors, the UTXO set or the mempool.

Util

9
createmultisig
Creates a multi-signature address with n signature of m keys required.
deriveaddresses
Derives one or more addresses corresponding to an output descriptor.
estimatesmartfee
Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within conf_target blocks.
getdescriptorinfo
Analyses a descriptor.
getindexinfo
Returns the status of one or all available indices currently running in the node.
signmessagewithprivkey
Sign a message with the private key of an address.
validateaddress
Return information about the given bitcoin address.
verifymessage
Verify a signed message.
getzmqnotifications
Returns information about the active ZeroMQ notifications.

Wallet

60
abandontransaction
Mark in-wallet transaction as abandoned. Marks transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent.
createwallet
Creates and loads a new wallet.
dumpprivkey
Reveals the private key corresponding to 'address'. Only for legacy wallets.
getbalance
Returns the total available balance in the wallet.
getnewaddress
Returns a new Bitcoin address for receiving payments.
gettransaction
Get detailed information about in-wallet transaction.
getwalletinfo
Returns an object containing various wallet state info.
importaddress
Adds an address or script to the wallet without the associated private key, to watch for transactions.
listreceivedbyaddress
List balances by receiving address.
listtransactions
Returns up to 'count' most recent transactions for the wallet.
listunspent
Returns array of unspent transaction outputs (UTXOs) in the wallet.
listwallets
Returns a list of currently loaded wallets.
loadwallet
Loads a wallet from a wallet file or directory.
sendtoaddress
Send an amount to a given address.
walletpassphrase
Stores the wallet decryption key in memory for 'timeout' seconds.
sethdseed
Set or generate a new HD wallet seed. Non-HD wallets will not be upgraded. Only for legacy wallets.
unloadwallet
Unloads the wallet.
addmultisigaddress
Add an nrequired-to-sign multisignature address to the wallet. Each key is a bitcoin address or hex-encoded public key.
backupwallet
Safely copies current wallet file to destination, which can be a directory or a path with filename.
bumpfee
Bumps the fee of an opt-in-RBF transaction, replacing it with a new transaction by adjusting the change output.
dumpwallet
Dumps all wallet keys in a human-readable format to a server-side file. Only for legacy wallets.
encryptwallet
Encrypts the wallet with passphrase. After this, any calls that interact with private keys will require the passphrase.
getaddressesbylabel
Returns the list of addresses assigned the specified label.
getaddressinfo
Return information about the given bitcoin address. Some info requires the address to be in the wallet.
getbalances
Returns an object with all balances in BTC, broken down by trusted, untrusted pending, and immature.
getrawchangeaddress
Returns a new Bitcoin address for receiving change. This is for use with raw transactions, NOT normal use.
getreceivedbyaddress
Returns the total amount received by the given address in transactions with at least minconf confirmations.
getreceivedbylabel
Returns the total amount received by addresses with the given label in transactions with at least minconf confirmations.
importdescriptors
Import descriptors. This requires a new wallet backup. Only for descriptor wallets.
importmulti
Import addresses/scripts (with private or public keys, redeem script), rescanning all addresses in one shot. Only for legacy wallets.
importprivkey
Adds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup. Only for legacy wallets.
importprunedfunds
Imports funds without rescan. Corresponding address or script must previously be included in wallet.
importpubkey
Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Only for legacy wallets.
importwallet
Imports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup. Only for legacy wallets.
keypoolrefill
Fills the keypool. Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.
listaddressgroupings
Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions.
listdescriptors
List descriptors imported into a descriptor-enabled wallet.
listlabels
Returns the list of all labels, or labels that are assigned to addresses with a specific purpose.
listlockunspent
Returns list of temporarily unspendable outputs. See lockunspent for lock and unlock.
listreceivedbylabel
List received transactions by label.
listsinceblock
Get all transactions in blocks since block blockhash, or all transactions if omitted.
lockunspent
Updates list of temporarily unspendable outputs. Temporarily lock or unlock specified transaction outputs.
psbtbumpfee
Bumps the fee of an opt-in-RBF transaction, returning the new transaction as a PSBT instead of broadcasting.
removeprunedfunds
Deletes the specified transaction from the wallet. Meant for use with pruned wallets after importprunedfunds.
rescanblockchain
Rescan the local blockchain for wallet related transactions. Can specify a start and stop height.
restorewallet
Restore and loads a wallet from backup.
send
Send a transaction. Experimental, may change in future versions.
sendall
Spend the value of all (or specific) confirmed UTXOs to one or more recipients. Unconfirmed inputs may be included with include_unsafe.
sendmany
Send multiple times. Amounts are double-precision floating point numbers.
setlabel
Sets the label associated with the given address.
settxfee
Set the transaction fee per kB for this wallet. Overrides the global -paytxfee.
setwalletflag
Change the state of a given wallet flag for a wallet.
signmessage
Sign a message with the private key of an address. The address must be a P2PKH address.
signrawtransactionwithwallet
Sign inputs for raw transaction (serialized, hex-encoded) using wallet keys.
simulaterawtransaction
Calculate the balance change resulting from a list of raw transactions as if they were sent/received by this wallet.
walletcreatefundedpsbt
Creates and funds a transaction in PSBT format. Inputs will be added if supplied inputs are not enough.
walletdisplayaddress
Display address on an external signer for verification.
walletlock
Removes the wallet encryption key from memory, locking the wallet. After calling this, you will need to call walletpassphrase again before being able to use private keys.
walletpassphrasechange
Changes the wallet passphrase from oldpassphrase to newpassphrase.
walletprocesspsbt
Update a PSBT with input information from the wallet and then sign inputs that the wallet can sign for.

Signer

1
enumeratesigners
Returns a list of external signers from -signer.

bitcoind.app — Bitcoin Core RPC Reference

GuidesContact ↗