Bitcoin Core RPCs

All 150 RPCs in current Bitcoin Core, plus 23 historically-removed ones for reference. Click any name for full docs. marks RPCs you can run live against our node.

blockchain

28
getbestblockhash safe returns the hash of the best (tip) block in the most-work fully-validated chain.
getblock safe gets a block If verbosity is 0, returns a string that is serialized, hex-encoded data for block 'hash'. If verbosity is 1, returns an Object with information about block <hash>. If verbosity is 2, returns an Object with information about block <hash> and information about each transaction. If verbosity is 3, returns an Object with information about block <hash> and information about each transaction, including prevout information for inputs (only for unpruned blocks in the current best chain).
getblockchaininfo safe provides information about the current state of the block chain.
getblockcount safe returns the height of the most-work fully-validated chain.
getblockfilter expensive retrieve a BIP 157 content filter for a particular block.
getblockfrompeer dangerous attempts to fetch block from a given peer. Must have the header for this block, e.g. using submitheader. Subsequent calls for the same block and a new peer will cause the response from the previous peer to be ignored.
getblockhash safe returns the header hash of a block at the given height in the local best block chain.
getblockheader safe gets a block header with a particular header hash from the local block database either as a JSON object or as a serialized block header.
getblockstats expensive computes per block statistics for a given window. All amounts are in satoshis.
getchaintips safe returns information about the highest-height block (tip) of each local block chain.
getchaintxstats expensive computes statistics about the total number and rate of transactions in the chain.
getdeploymentinfo safe returns an object containing various state info regarding deployments of consensus changes.
getdifficulty safe returns the proof-of-work difficulty as a multiple of the minimum difficulty.
getmempoolancestors safe returns all in-mempool ancestors for a transaction in the mempool.
getmempooldescendants safe returns all in-mempool descendants for a transaction in the mempool.
getmempoolentry safe returns details on the active state of the TX memory pool.
getmempoolinfo safe returns information about the node&#039;s current transaction memory pool.
getrawmempool safe returns all transaction ids in memory pool as a json array of string transaction ids.
gettxout safe returns details about an unspent transaction output (UTXO).
gettxoutproof expensive returns a hex-encoded proof that one or more specified transactions were included in a block.
gettxoutsetinfo expensive returns statistics about the unspent transaction output set.
gettxspendingprevout safe scans the mempool to find transactions spending any of the given outputs
preciousblock dangerous treats a block as if it were received before others with the same work.
pruneblockchain dangerous prunes the blockchain up to a specified height or timestamp.
savemempool dangerous dumps the mempool to disk. It will fail until the previous dump is fully loaded.
scantxoutset expensive scans the unspent transaction output set for entries that match certain output descriptors
verifychain expensive verifies each entry in the local block chain database.
verifytxoutproof safe verifies that a proof points to a transaction in a block, returning the transaction it commits to and throwing an RPC error if the block is not in our best chain

control

6
getmemoryinfo safe returns information about memory usage.
getrpcinfo safe returns details of the RPC server.
help safe lists all available public RPC commands, or gets help for the specified RPC. Commands which are unavailable will not be listed, such as wallet RPCs if wallet support is disabled.
logging dangerous gets and sets the logging configuration.
stop dangerous safely shuts down the Bitcoin Core server.
uptime safe returns the total uptime of the server in seconds.

generating

3
generateblock dangerous mines a set of ordered transactions to a specified address or descriptor and return the block hash.
generatetoaddress dangerous mines to a specified address and returns the block hashes.
generatetodescriptor dangerous mines to a specified descriptor and returns the block hashes.

mining

6
getblocktemplate expensive returns data needed to construct a block to work on.
getmininginfo safe returns a json object containing mining-related information.
getnetworkhashps safe returns the estimated network hashes per second based on the last n blocks.
prioritisetransaction dangerous accepts the transaction into mined blocks at a higher (or lower) priority
submitblock dangerous attempts to submit new block to network.
submitheader dangerous decodes the given hexdata as a header and submits it as a candidate chain tip if valid.

network

13
addnode dangerous attempts to add or remove a node from the addnode list, or to try a connection to a node once.
clearbanned dangerous clears all banned IPs.
disconnectnode dangerous immediately disconnects from the specified peer node.
getaddednodeinfo safe returns information about the given added node, or all added nodes (except onetry nodes). Only nodes which have been manually added using the `addnode` RPC will have their information displayed.
getconnectioncount safe returns the number of connections to other nodes.
getnettotals safe returns information about network traffic, including bytes in, bytes out, and the current time.
getnetworkinfo safe returns an object containing various state info regarding P2P networking.
getnodeaddresses safe returns known addresses, after filtering for quality and recency. These can potentially be used to find new peers in the network. The total number of addresses known to the node may be higher.
getpeerinfo safe returns data about each connected network peer as a json array of objects.
listbanned safe lists all manually banned IPs/Subnets.
ping safe requests that a ping be sent to all other nodes, to measure ping time. Results provided in getpeerinfo, pingtime and pingwait fields are decimal seconds. Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.
setban dangerous attempts add or remove a IP/Subnet from the banned list.
setnetworkactive dangerous disables/enables all P2P network activity.

rawtransactions

17
analyzepsbt safe analyzes and provides information about the current status of a PSBT and its inputs
combinepsbt safe combines multiple partially signed Bitcoin transactions into one transaction. Implements the Combiner role.
combinerawtransaction safe combines multiple partially signed transactions into one transaction. The combined transaction may be another partially signed transaction or a fully signed transaction.
converttopsbt safe converts a network serialized transaction to a PSBT. This should be used only with createrawtransaction and fundrawtransaction
createpsbt safe creates a transaction in the Partially Signed Transaction format. Implements the Creator role.
createrawtransaction safe creates a transaction spending the given inputs and creating new outputs. Outputs can be addresses or data. Returns hex-encoded raw transaction. Note that the transaction's inputs are not signed, and it is not stored in the wallet or transmitted to the network.
decodepsbt safe returns a JSON object representing the serialized, base64-encoded partially signed Bitcoin transaction.
decoderawtransaction safe returns a JSON object representing the serialized, hex-encoded transaction.
decodescript safe decodes a hex-encoded script.
finalizepsbt safe finalizes he inputs of a PSBT. If the transaction is fully signed, it will produce a network serialized transaction which can be broadcast with sendrawtransaction. Otherwise a PSBT will be created which has the final_scriptSig and final_scriptWitness fields filled for inputs that are complete. Implements the Finalizer and Extractor roles.
fundrawtransaction dangerous adds inputs to a transaction until it has enough in value to meet its out value.
getrawtransaction safe returns the raw transaction data.
joinpsbts safe joins multiple distinct PSBTs with different inputs and outputs into one PSBT with inputs and outputs from all of the PSBTs No input in any of the PSBTs can be in more than one of the PSBTs.
sendrawtransaction dangerous submits a raw transaction (serialized, hex-encoded) to local node and network.
signrawtransactionwithkey dangerous signsinputs for raw transaction (serialized, hex-encoded).
testmempoolaccept safe returns result of mempool acceptance tests indicating if raw transaction(s) (serialized, hex-encoded) would be accepted by mempool.
utxoupdatepsbt safe updates all segwit inputs and outputs in a PSBT with data from output descriptors, the UTXO set or the mempool.

signer

2
displayaddress dangerous experimental
enumeratesigners dangerous returns a list of external signers from -signer.

util

9
createmultisig safe creates a multi-signature address with n signature of m keys required. It returns a json object with the address and redeemScript.
deriveaddresses safe returns one or more addresses corresponding to an output descriptor.
estimaterawfee safe estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within conf_target blocks if possible. External clients can query and use this data in their own fee estimation logic.
estimatesmartfee safe estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within conf_target blocks if possible and return the number of blocks for which the estimate is valid.
getdescriptorinfo safe analyses a descriptor.
getindexinfo safe returns the status of one or all available indices currently running in the node
signmessagewithprivkey dangerous signs a message with the private key of an address
validateaddress safe returns information about the given Bitcoin address.
verifymessage safe verifies a signed message.

wallet

65
abandontransaction wallet marks an in-wallet transaction and all its in-wallet descendants as abandoned. This allows their inputs to be respent.
abortrescan wallet stops current wallet rescan triggered by an RPC call, e.g. by an importprivkey call.
addmultisigaddress wallet adds an nrequired-to-sign multisignature address to the wallet.
backupwallet wallet safely copies current wallet file to destination, which can be a directory or a path with filename.
bumpfee wallet bumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.
createwallet wallet creates and loads a new wallet.
dumpprivkey wallet reveals the private key corresponding to 'address'.
dumpwallet wallet dumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.
encryptwallet wallet encrypts the wallet with 'passphrase'. This is for first time encryption.
getaddressesbylabel wallet returns the list of addresses assigned the specified label.
getaddressinfo wallet returns information about the given bitcoin address. Some information requires the address to be in the wallet.
getbalance wallet returns the total available balance.
getbalances wallet returns an object with all balances in BTC.
getnewaddress wallet returns a new Bitcoin address for receiving payments. If an account is specified, payments received with the address will be credited to that account.
getrawchangeaddress wallet returns a new Bitcoin address for receiving change. This is for use with raw transactions, not normal use.
getreceivedbyaddress wallet returns the total amount received by the given address in transactions with at least minconf confirmations.
getreceivedbylabel wallet returns the total amount received by addresses with <label> in transactions with at least [minconf] confirmations.
gettransaction wallet gets detailed information about an in-wallet transaction.
getwalletinfo wallet returns an object containing various wallet state info.
importaddress wallet adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.
importdescriptors wallet triggers a rescan of the blockchain based on the earliest timestamp of all descriptors being imported. Requires a new wallet backup.
importmulti wallet imports addresses or scripts (with private keys, public keys, or P2SH redeem scripts) and optionally performs the minimum necessary rescan for all imports.
importprivkey wallet adds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup. Hint: use importmulti to import more than one private key.
importprunedfunds wallet imports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.
importpubkey wallet adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.
importwallet wallet imports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.
keypoolrefill wallet fills the keypool.
listaddressgroupings wallet lists groups of addresses that may have had their common ownership made public by common use as inputs in the same transaction or from being used as change from a previous transaction.
listdescriptors wallet lists descriptors imported into a descriptor-enabled wallet.
listlabels wallet returns the list of all labels, or labels that are assigned to addresses with a specific purpose.
listlockunspent wallet returns a list of temporarily unspendable (locked) outputs.
listreceivedbyaddress wallet lists balances by receiving address.
listreceivedbylabel wallet lists received transactions by label.
listsinceblock wallet gets all transactions in blocks since block [blockhash], or all transactions if omitted.
listtransactions wallet returns up to 'count' most recent transactions skipping the first 'from' transactions.
listunspent wallet returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations. Optionally filter to only include txouts paid to specified addresses.
listwalletdir wallet returns a list of wallets in the wallet directory
listwallets wallet returns a list of currently loaded wallets.
loadwallet wallet loads a wallet from a wallet file or directory.
lockunspent wallet updates list of temporarily unspendable outputs. Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs. If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked.
migratewallet wallet migrates Legacy (non-descriptor) wallets to Descriptor wallets. experimental
newkeypool wallet entirely clears and refills the keypool.
psbtbumpfee wallet bumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.
removeprunedfunds wallet deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds.
rescanblockchain wallet rescan the local blockchain for wallet related transactions.
restorewallet wallet restores and loads a wallet from backup.
send wallet sends a transaction. EXPERIMENTAL
sendall wallet spends the value of all (or specific) confirmed UTXOs in the wallet to one or more recipients. EXPERIMENTAL
sendmany wallet creates and broadcasts a transaction which sends outputs to multiple addresses.
sendtoaddress wallet spends an amount to a given address.
sethdseed wallet allows users to set a new HD seed or set their own HD seed. This allows for a new HD seed to be used. A new backup must be made when a new HD seed is set.
setlabel wallet intended as a replacement for the deprecated 'account' API.
settxfee wallet sets the transaction fee per kilobyte paid by transactions created by this wallet.
setwalletflag wallet changes the state of the given wallet flag for a wallet
signmessage wallet signs a message with the private key of an address.
signrawtransactionwithwallet wallet signs inputs for raw transaction (serialized, hex-encoded)
simulaterawtransaction wallet calculates the balance change resulting in the signing and broadcasting of the given transaction(s).
unloadwallet wallet unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument.
upgradewallet wallet upgrades to the latest version if no version number is specified. New keys may be generated and a new wallet backup will need to be made
walletcreatefundedpsbt wallet creates and funds a transaction in the Partially Signed Transaction format.
walletdisplayaddress wallet displays address on an external signer for verification
walletlock wallet removes the wallet encryption key from memory, locking the wallet. After calling this method, you will need to call `walletpassphrase` again before being able to call any methods which require the wallet to be unlocked.
walletpassphrase wallet stores the wallet decryption key in memory for 'timeout' seconds. This is needed prior to performing transactions related to private keys such as sending bitcoins
walletpassphrasechange wallet changes the wallet passphrase from &#039;old passphrase&#039; to &#039;new passphrase&#039;.
walletprocesspsbt wallet updates a PSBT with input information from our wallet and then sign inputs that we can sign for. Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

zmq

1
getzmqnotifications safe returns information about the active ZeroMQ notifications.

Removed from Bitcoin Core

23

Grouped by their original Bitcoin Core category. No longer present in modern Core; documented for users finding them in old tutorials.

getwork mining removed Original pre-BIP-22 mining interface, where the node handed out partially-constructed block headers for ASICs to grind. Long obsolete.
getgenerate mining removed Returned whether the node was generating (mining) blocks. CPU mining was removed entirely from Bitcoin Core.
gethashespersec mining removed Returned the hashes-per-second rate of the node's CPU miner. CPU mining was removed entirely from Bitcoin Core.
setgenerate mining removed Toggled the node's CPU miner. CPU mining was removed; use generatetoaddress on regtest for testing.
estimatepriority util removed Estimated the priority a zero-fee transaction needed to begin confirmation. The 'priority' concept itself was removed from Bitcoin Core.
estimatesmartpriority util removed Estimated approximate priority a zero-fee transaction needed for confirmation. Removed along with the priority concept.
getinfo control removed Catch-all node-status RPC. Replaced by the more focused get*info family for clearer responsibility split.
estimatefee util removed Estimated the approximate fee per kilobyte needed for a transaction to confirm within nblocks blocks. Replaced by estimatesmartfee.
addwitnessaddress wallet removed Added a witness address for a script with known pubkey or redeemscript. Replaced by passing an address-type argument to getnewaddress.
signrawtransaction rawtransactions removed Signed inputs of a raw transaction. Split into two RPCs in 0.18 to make the wallet vs key-only paths explicit.
validateaddress (wallet fields) util removed The wallet-related fields of validateaddress (ismine, iswatchonly, etc.) were split into getaddressinfo. validateaddress itself still exists but only validates address structure.
getaccount wallet removed Returned the account associated with the given address. Removed with the rest of the account API in 0.18.
getaccountaddress wallet removed Returned the current Bitcoin address for receiving payments to a named account.
getaddressbyaccount wallet removed Returned the list of addresses for the given account. (Bitcoin Core's actual RPC name was the plural 'getaddressesbyaccount'.) Replaced by getaddressesbylabel.
getreceivedbyaccount wallet removed Returned total amount received by addresses with the given account in confirmed transactions.
listaccounts wallet removed Returned object that has account names as keys and account balances as values.
listreceivedbyaccount wallet removed Listed balances by account.
move wallet removed Moved a specified amount from one account in your wallet to another. The internal-bookkeeping concept of accounts was removed; balance moves between labels are not modeled in modern Core.
sendfrom wallet removed Sent an amount from an account to a Bitcoin address. Replaced by sendtoaddress (or sendmany), with addresses chosen by descriptor rather than account tag.
setaccount wallet removed Set the account associated with the given address. Replaced by setlabel.
generate wallet removed Mined blocks immediately to a wallet-derived address (regtest only). Removed because it relied on the wallet's internal address generation; generatetoaddress is the modern equivalent and works without a wallet.
getmemorypool mining removed Original mining-template RPC. Replaced by the BIP 22-compliant getblocktemplate.
getunconfirmedbalance wallet removed Returned the unconfirmed balance of the wallet. Folded into getbalances which returns confirmed/unconfirmed/immature/etc. as a single structured response.