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.

safe

54

Read-only and inexpensive. You can run this against our node directly from this page.

analyzepsbt rawtransactions analyzes and provides information about the current status of a PSBT and its inputs
combinepsbt rawtransactions combines multiple partially signed Bitcoin transactions into one transaction. Implements the Combiner role.
combinerawtransaction rawtransactions combines multiple partially signed transactions into one transaction. The combined transaction may be another partially signed transaction or a fully signed transaction.
converttopsbt rawtransactions converts a network serialized transaction to a PSBT. This should be used only with createrawtransaction and fundrawtransaction
createmultisig util creates a multi-signature address with n signature of m keys required. It returns a json object with the address and redeemScript.
createpsbt rawtransactions creates a transaction in the Partially Signed Transaction format. Implements the Creator role.
createrawtransaction rawtransactions 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 rawtransactions returns a JSON object representing the serialized, base64-encoded partially signed Bitcoin transaction.
decoderawtransaction rawtransactions returns a JSON object representing the serialized, hex-encoded transaction.
decodescript rawtransactions decodes a hex-encoded script.
deriveaddresses util returns one or more addresses corresponding to an output descriptor.
estimaterawfee util 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 util 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.
finalizepsbt rawtransactions 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.
getaddednodeinfo network 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.
getbestblockhash blockchain returns the hash of the best (tip) block in the most-work fully-validated chain.
getblock blockchain 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 blockchain provides information about the current state of the block chain.
getblockcount blockchain returns the height of the most-work fully-validated chain.
getblockhash blockchain returns the header hash of a block at the given height in the local best block chain.
getblockheader blockchain 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.
getchaintips blockchain returns information about the highest-height block (tip) of each local block chain.
getconnectioncount network returns the number of connections to other nodes.
getdeploymentinfo blockchain returns an object containing various state info regarding deployments of consensus changes.
getdescriptorinfo util analyses a descriptor.
getdifficulty blockchain returns the proof-of-work difficulty as a multiple of the minimum difficulty.
getindexinfo util returns the status of one or all available indices currently running in the node
getmemoryinfo control returns information about memory usage.
getmempoolancestors blockchain returns all in-mempool ancestors for a transaction in the mempool.
getmempooldescendants blockchain returns all in-mempool descendants for a transaction in the mempool.
getmempoolentry blockchain returns details on the active state of the TX memory pool.
getmempoolinfo blockchain returns information about the node&#039;s current transaction memory pool.
getmininginfo mining returns a json object containing mining-related information.
getnettotals network returns information about network traffic, including bytes in, bytes out, and the current time.
getnetworkhashps mining returns the estimated network hashes per second based on the last n blocks.
getnetworkinfo network returns an object containing various state info regarding P2P networking.
getnodeaddresses network 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 network returns data about each connected network peer as a json array of objects.
getrawmempool blockchain returns all transaction ids in memory pool as a json array of string transaction ids.
getrawtransaction rawtransactions returns the raw transaction data.
getrpcinfo control returns details of the RPC server.
gettxout blockchain returns details about an unspent transaction output (UTXO).
gettxspendingprevout blockchain scans the mempool to find transactions spending any of the given outputs
getzmqnotifications zmq returns information about the active ZeroMQ notifications.
help control 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.
joinpsbts rawtransactions 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.
listbanned network lists all manually banned IPs/Subnets.
ping network 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.
testmempoolaccept rawtransactions returns result of mempool acceptance tests indicating if raw transaction(s) (serialized, hex-encoded) would be accepted by mempool.
uptime control returns the total uptime of the server in seconds.
utxoupdatepsbt rawtransactions updates all segwit inputs and outputs in a PSBT with data from output descriptors, the UTXO set or the mempool.
validateaddress util returns information about the given Bitcoin address.
verifymessage util verifies a signed message.
verifytxoutproof blockchain 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

expensive

8

CPU- or scan-heavy. Cached and rate-limited per IP to keep the node healthy.

getblockfilter blockchain retrieve a BIP 157 content filter for a particular block.
getblockstats blockchain computes per block statistics for a given window. All amounts are in satoshis.
getblocktemplate mining returns data needed to construct a block to work on.
getchaintxstats blockchain computes statistics about the total number and rate of transactions in the chain.
gettxoutproof blockchain returns a hex-encoded proof that one or more specified transactions were included in a block.
gettxoutsetinfo blockchain returns statistics about the unspent transaction output set.
scantxoutset blockchain scans the unspent transaction output set for entries that match certain output descriptors
verifychain blockchain verifies each entry in the local block chain database.

dangerous

23

Would harm the node, the network, or expose secrets. Documentation only, never executable from the web.

addnode network attempts to add or remove a node from the addnode list, or to try a connection to a node once.
clearbanned network clears all banned IPs.
disconnectnode network immediately disconnects from the specified peer node.
displayaddress signer experimental
enumeratesigners signer returns a list of external signers from -signer.
fundrawtransaction rawtransactions adds inputs to a transaction until it has enough in value to meet its out value.
generateblock generating mines a set of ordered transactions to a specified address or descriptor and return the block hash.
generatetoaddress generating mines to a specified address and returns the block hashes.
generatetodescriptor generating mines to a specified descriptor and returns the block hashes.
getblockfrompeer blockchain 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.
logging control gets and sets the logging configuration.
preciousblock blockchain treats a block as if it were received before others with the same work.
prioritisetransaction mining accepts the transaction into mined blocks at a higher (or lower) priority
pruneblockchain blockchain prunes the blockchain up to a specified height or timestamp.
savemempool blockchain dumps the mempool to disk. It will fail until the previous dump is fully loaded.
sendrawtransaction rawtransactions submits a raw transaction (serialized, hex-encoded) to local node and network.
setban network attempts add or remove a IP/Subnet from the banned list.
setnetworkactive network disables/enables all P2P network activity.
signmessagewithprivkey util signs a message with the private key of an address
signrawtransactionwithkey rawtransactions signsinputs for raw transaction (serialized, hex-encoded).
stop control safely shuts down the Bitcoin Core server.
submitblock mining attempts to submit new block to network.
submitheader mining decodes the given hexdata as a header and submits it as a candidate chain tip if valid.

wallet

65

Wallet operation. Our node runs without a wallet, so this RPC is structurally unreachable here. Docs are kept for reference.

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.

Removed from Bitcoin Core

23

These RPCs no longer exist in modern Bitcoin Core. Documented here so users finding them in old tutorials know what they did, when they went away, and what replaced them.

getwork mining removed v0.10 Original pre-BIP-22 mining interface, where the node handed out partially-constructed block headers for ASICs to grind. Long obsolete.
getgenerate mining removed v0.13 Returned whether the node was generating (mining) blocks. CPU mining was removed entirely from Bitcoin Core.
gethashespersec mining removed v0.13 Returned the hashes-per-second rate of the node's CPU miner. CPU mining was removed entirely from Bitcoin Core.
setgenerate mining removed v0.13 Toggled the node's CPU miner. CPU mining was removed; use generatetoaddress on regtest for testing.
estimatepriority util removed v0.15 Estimated the priority a zero-fee transaction needed to begin confirmation. The 'priority' concept itself was removed from Bitcoin Core.
estimatesmartpriority util removed v0.15 Estimated approximate priority a zero-fee transaction needed for confirmation. Removed along with the priority concept.
getinfo control removed v0.16 Catch-all node-status RPC. Replaced by the more focused get*info family for clearer responsibility split.
estimatefee util removed v0.17 Estimated the approximate fee per kilobyte needed for a transaction to confirm within nblocks blocks. Replaced by estimatesmartfee.
addwitnessaddress wallet removed v0.17 Added a witness address for a script with known pubkey or redeemscript. Replaced by passing an address-type argument to getnewaddress.
signrawtransaction rawtransactions removed v0.18 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 v0.18 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 v0.18 Returned the account associated with the given address. Removed with the rest of the account API in 0.18.
getaccountaddress wallet removed v0.18 Returned the current Bitcoin address for receiving payments to a named account.
getaddressbyaccount wallet removed v0.18 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 v0.18 Returned total amount received by addresses with the given account in confirmed transactions.
listaccounts wallet removed v0.18 Returned object that has account names as keys and account balances as values.
listreceivedbyaccount wallet removed v0.18 Listed balances by account.
move wallet removed v0.18 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 v0.18 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 v0.18 Set the account associated with the given address. Replaced by setlabel.
generate wallet removed v0.19 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 v0.8 Original mining-template RPC. Replaced by the BIP 22-compliant getblocktemplate.
getunconfirmedbalance wallet removed v22.0 Returned the unconfirmed balance of the wallet. Folded into getbalances which returns confirmed/unconfirmed/immature/etc. as a single structured response.