Mar 21, 2022 27 min read

Complete Bitcoin RPC calls list with examples

Complete Bitcoin RPC calls list with examples
Bitcoin RPC 
Table of Contents

This is the complete list of all Bitcoin protocol RPC calls with cli & curl examples. The below list of examples are taken from developer.bitcoin.org. For quick access use CRTL + F & type name of RPC call.


Blockchain RPC

getbestblockhash

Returns the hash of the best (tip) block in the most-work fully-validated chain.

bitcoin-cli getbestblockhash 
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getbestb

getblock "blockhash" ( verbosity )

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.

bitcoin-cli getblock "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblock", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getblockchaininfo

Returns an object containing various state info regarding blockchain processing.

bitcoin-cli getblockchaininfo 
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockchaininfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getblockcount

Returns the height of the most-work fully-validated chain.

The genesis block has height 0.

bitcoin-cli getblockcount
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockcount", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getblockfilter "blockhash" ( "filtertype" )

Retrieve a BIP 157 content filter for a particular block.

bitcoin-cli getblockfilter "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09" "basic"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockfilter



getblockhash height

Returns hash of block in best-block-chain at height provided.

bitcoin-cli getblockhash 1000
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockhash", "params": [1000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getblockheader "blockhash" ( verbose )

If verbose is false, returns a string that is serialized, hex-encoded data for blockheader ‘hash’.

If verbose is true, returns an Object with information about blockheader ‘hash’.

bitcoin-cli getblockheader "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockheader", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getblockstats hash_or_height ( stats )

Compute per block statistics for a given window. All amounts are in satoshis.

It won’t work for some heights with pruning.

bitcoin-cli getblockstats '"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"' '["minfeerate","avgfeerate"]'

bitcoin-cli getblockstats 1000 '["minfeerate","avgfeerate"]'
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockstats", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09", ["minfeerate","avgfeerate"]]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockstats", "params": [1000, ["minfeerate","avgfeerate"]]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getchaintips

Return information about all known tips in the block tree, including the main chain as well as orphaned branches.

bitcoin-cli getchaintips
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getchaintips", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getchaintxstats ( nblocks "blockhash" )

Compute statistics about the total number and rate of transactions in the chain.

bitcoin-cli getchaintxstats
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getchaintxstats", "params": [2016]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getdifficulty

Returns the proof-of-work difficulty as a multiple of the minimum difficulty.

bitcoin-cli getdifficulty
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getdifficulty", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getmempoolancestors "txid" ( verbose )

If txid is in the mempool, returns all in-mempool ancestors.

bitcoin-cli getmempoolancestors "mytxid"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmempoolancestors", "params": ["mytxid"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getmempooldescendants "txid" ( verbose )

If txid is in the mempool, returns all in-mempool descendants.

bitcoin-cli getmempooldescendants "mytxid"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmempooldescendants", "params": ["mytxid"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getmempoolentry "txid"

Returns mempool data for given transaction

bitcoin-cli getmempoolentry "mytxid"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmempoolentry", "params": ["mytxid"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getmempoolinfo

Returns details on the active state of the TX memory pool.

bitcoin-cli getmempoolinfo
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmempoolinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getrawmempool ( verbose mempool_sequence )

Returns all transaction ids in memory pool as a json array of string transaction ids.

Hint: use getmempoolentry to fetch a specific transaction from the mempool.

bitcoin-cli getrawmempool true
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrawmempool", "params": [true]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

gettxout "txid" n ( include_mempool )

Returns details about an unspent transaction output.

bitcoin-cli listunspent

bitcoin-cli gettxout "txid" 1
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "gettxout", "params": ["txid", 1]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

gettxoutproof ["txid",...] ( "blockhash" )

Returns a hex-encoded proof that “txid” was included in a block.

[
  "txid",    (string) A transaction hash
  ...
]

gettxoutsetinfo ( "hash_type" )

Returns statistics about the unspent transaction output set.

bitcoin-cli gettxoutsetinfo
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "gettxoutsetinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

preciousblock "blockhash"

Treats a block as if it were received before others with the same work.

bitcoin-cli preciousblock "blockhash"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "preciousblock", "params": ["blockhash"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

pruneblockchain height

To prune blocks whose block time is at least 2 hours older than the provided timestamp.

bitcoin-cli pruneblockchain 1000
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "pruneblockchain", "params": [1000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

savemempool

Dumps the mempool to disk. It will fail until the previous dump is fully loaded.

bitcoin-cli savemempool
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "savemempool", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

scantxoutset "action" ( [scanobjects,...] )

EXPERIMENTAL warning: this call may be removed or changed in future releases.

Scans the unspent transaction output set for entries that match certain output descriptors.

[
  "descriptor",             (string) An output descriptor
  {                         (json object) An object with output descriptor and metadata
    "desc": "str",          (string, required) An output descriptor
    "range": n or [n,n],    (numeric or array, optional, default=1000) The range of HD chain indexes to explore (either end or [begin,end])
  },
  ...
]

verifychain ( checklevel nblocks )

Verifies blockchain database.

bitcoin-cli verifychain
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "verifychain", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

verifytxoutproof "proof"

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

[           (json array)
  "hex",    (string) The txid(s) which the proof commits to, or empty array if the proof can not be validated.
  ...
]

Control RPCs

getmemoryinfo ( "mode" )

Returns an object containing information about memory usage.

bitcoin-cli getmemoryinfo
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmemoryinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getrpcinfo

Returns details of the RPC server.

bitcoin-cli getrpcinfo
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrpcinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

help ( "command" )

List all commands, or get help for a specified command.


logging ( ["include_category",...] ["exclude_category",...] )

Gets and sets the logging configuration.

bitcoin-cli logging "[\"all\"]" "[\"http\"]"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "logging", "params": [["all"], ["libevent"]]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

stop

Request a graceful shutdown of Bitcoin Core.


uptime

Returns the total uptime of the server.

bitcoin-cli uptime
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "uptime", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

Generating RPCs

generateblock "output" ["rawtx/txid",...]

Mine a block with a set of ordered transactions immediately to a specified address or descriptor (before the RPC call returns)

bitcoin-cli generateblock "myaddress" '["rawtx", "mempool_txid"]'

generatetoaddress nblocks "address" ( maxtries )

Mine blocks immediately to a specified address (before the RPC call returns)

bitcoin-cli generatetoaddress 11 "myaddress"
bitcoin-cli getnewaddress

generatetodescriptor num_blocks "descriptor" ( maxtries )

Mine blocks immediately to a specified descriptor (before the RPC call returns)

bitcoin-cli generatetodescriptor 11 "mydesc"

Mining RPCs

getblocktemplate ( "template_request" )

If the request parameters include a ‘mode’ key, that is used to explicitly select between the default ‘template’ request or a ‘proposal’.

bitcoin-cli getblocktemplate '{"rules": ["segwit"]}'
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblocktemplate", "params": [{"rules": ["segwit"]}]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getmininginfo

Returns a json object containing mining-related information.

bitcoin-cli getmininginfo
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmininginfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

prioritisetransaction "txid" ( dummy ) fee_delta

Accepts the transaction into mined blocks at a higher (or lower) priority

bitcoin-cli prioritisetransaction "txid" 0.0 10000
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "prioritisetransaction", "params": ["txid", 0.0, 10000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

submitblock "hexdata" ( "dummy" )

Attempts to submit new block to network.

bitcoin-cli submitblock "mydata"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "submitblock", "params": ["mydata"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

submitheader "hexdata"

Decode the given hexdata as a header and submit it as a candidate chain tip if valid.

Throws when the header is invalid.

bitcoin-cli submitheader "aabbcc"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "submitheader", "params": ["aabbcc"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

Network RPCs

addnode "node" "command"

Attempts to add or remove a node from the addnode list.

bitcoin-cli addnode "192.168.0.6:8333" "onetry"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "addnode", "params": ["192.168.0.6:8333", "onetry"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

clearbanned

Clear all banned IPs.

bitcoin-cli clearbanned
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "clearbanned", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

disconnectnode ( "address" nodeid )

Immediately disconnects from the specified peer node.

Strictly one out of ‘address’ and ‘nodeid’ can be provided to identify the node.

To disconnect by nodeid, either set ‘address’ to the empty string, or call using the named ‘nodeid’ argument only.

bitcoin-cli disconnectnode "192.168.0.6:8333"

bitcoin-cli disconnectnode "" 1
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "disconnectnode", "params": ["192.168.0.6:8333"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "disconnectnode", "params": ["", 1]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getconnectioncount

Returns the number of connections to other nodes.

bitcoin-cli getconnectioncount
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getconnectioncount", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getnettotals

Returns information about network traffic, including bytes in, bytes out, and current time.

bitcoin-cli getnettotals
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnettotals", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getnetworkinfo

Returns an object containing various state info regarding P2P networking.

bitcoin-cli getnetworkinfo
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnetworkinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getnodeaddresses ( count )

Return known addresses which can potentially be used to find new nodes in the network

bitcoin-cli getnodeaddresses 8
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnodeaddresses", "params": [8]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getpeerinfo

Returns data about each connected network node as a json array of objects.

bitcoin-cli getpeerinfo
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getpeerinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

listbanned

List all manually banned IPs/Subnets.

bitcoin-cli listbanned
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listbanned", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

ping

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.

bitcoin-cli ping
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "ping", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

setban "subnet" "command" ( bantime absolute )

Attempts to add or remove an IP/Subnet from the banned list.

bitcoin-cli setban "192.168.0.6" "add" 86400

bitcoin-cli setban "192.168.0.0/24" "add"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "setban", "params": ["192.168.0.6", "add", 86400]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

setnetworkactive state

Disable/enable all p2p network activity.

Type: boolean, required

true to enable networking, false to disable


Rawtransactions RPCs

analyzepsbt "psbt"

Analyzes and provides information about the current status of a PSBT and its inputs

bitcoin-cli analyzepsbt "psbt"

combinepsbt ["psbt",...]

Combine multiple partially signed Bitcoin transactions into one transaction.

Implements the Combiner role.

bitcoin-cli combinepsbt '["mybase64_1", "mybase64_2", "mybase64_3"]'

combinerawtransaction ["hexstring",...]

Combine multiple partially signed transactions into one transaction.

The combined transaction may be another partially signed transaction or a fully signed transaction.

bitcoin-cli combinerawtransaction '["myhex1", "myhex2", "myhex3"]'

converttopsbt "hexstring" ( permitsigdata iswitness )

Converts a network serialized transaction to a PSBT. This should be used only with createrawtransaction and fundrawtransaction createpsbt and walletcreatefundedpsbt should be used for new applications.

bitcoin-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"

Convert the transaction to a PSBT:

bitcoin-cli converttopsbt "rawtransaction"

createpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable )

Creates a transaction in the Partially Signed Transaction format.

Implements the Creator role.

bitcoin-cli createpsbt "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"

createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable )

Create 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.

bitcoin-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"address\":0.01}]"

bitcoin-cli createrawtransaction "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "[{\"address\":0.01}]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "[{\"data\":\"00010203\"}]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

decodepsbt "psbt"

Return a JSON object representing the serialized, base64-encoded partially signed Bitcoin transaction.

bitcoin-cli decodepsbt "psbt"

decoderawtransaction "hexstring" ( iswitness )

Return a JSON object representing the serialized, hex-encoded transaction.

bitcoin-cli decoderawtransaction "hexstring"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "decoderawtransaction", "params": ["hexstring"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

decodescript "hexstring"

Decode a hex-encoded script.

bitcoin-cli decodescript "hexstring"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "decodescript", "params": ["hexstring"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

finalizepsbt "psbt" ( extract )

Finalize the 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.

bitcoin-cli finalizepsbt "psbt"

fundrawtransaction "hexstring" ( options iswitness )

If the transaction has no inputs, they will be automatically selected to meet its out value.

It will add at most one change output to the outputs.

No existing outputs will be modified unless “subtractFeeFromOutputs” is specified.

Create a transaction with no inputs:

bitcoin-cli createrawtransaction "[]" "{\"myaddress\":0.01}"
Add sufficient unsigned inputs to meet the output value:

bitcoin-cli fundrawtransaction "rawtransactionhex"
Sign the transaction:

bitcoin-cli signrawtransactionwithwallet "fundedtransactionhex"
Send the transaction:

bitcoin-cli sendrawtransaction "signedtransactionhex"

getrawtransaction "txid" ( verbose "blockhash" )

Return the raw transaction data.

bitcoin-cli getrawtransaction "mytxid"

bitcoin-cli getrawtransaction "mytxid" true

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrawtransaction", "params": ["mytxid", true]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

bitcoin-cli getrawtransaction "mytxid" false "myblockhash"

bitcoin-cli getrawtransaction "mytxid" true "myblockhash"

joinpsbts ["psbt",...]

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.

bitcoin-cli joinpsbts "psbt"

sendrawtransaction "hexstring" ( maxfeerate )

Submit a raw transaction (serialized, hex-encoded) to local node and network.

Create a transaction:

bitcoin-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"
Sign the transaction, and get back the hex:

bitcoin-cli signrawtransactionwithwallet "myhex"
Send the transaction (signed hex):

bitcoin-cli sendrawtransaction "signedhex"
As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "sendrawtransaction", "params": ["signedhex"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )

Sign inputs for raw transaction (serialized, hex-encoded).

bitcoin-cli signrawtransactionwithkey "myhex" "[\"key1\",\"key2\"]"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "signrawtransactionwithkey", "params": ["myhex", "[\"key1\",\"key2\"]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

testmempoolaccept ["rawtx",...] ( maxfeerate )

Returns result of mempool acceptance tests indicating if raw transaction (serialized, hex-encoded) would be accepted by mempool.

Create a transaction:

bitcoin-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"
Sign the transaction, and get back the hex:

bitcoin-cli signrawtransactionwithwallet "myhex"
Test acceptance of the transaction (signed hex):

bitcoin-cli testmempoolaccept '["signedhex"]'
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "testmempoolaccept", "params": [["signedhex"]]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

utxoupdatepsbt "psbt" ( ["",{"desc":"str","range":n or [n,n]},...] )

Updates all segwit inputs and outputs in a PSBT with data from output descriptors, the UTXO set or the mempool.

bitcoin-cli utxoupdatepsbt "psbt"

Util RPCs

createmultisig nrequired ["key",...] ( "address_type" )

Creates a multi-signature address with n signature of m keys required.

It returns a json object with the address and redeemScript.

Create a multisig address from 2 public keys:

bitcoin-cli createmultisig 2 "[\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\",\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\"]"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createmultisig", "params": [2, "[\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\",\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\"]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

deriveaddresses "descriptor" ( range )

Derives one or more addresses corresponding to an output descriptor.

bitcoin-cli deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#cjjspncu" "[0,2]"

estimatesmartfee conf_target ( "estimate_mode" )

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. Uses virtual transaction size as defined in BIP 141 (witness data is discounted).

bitcoin-cli estimatesmartfee 6

getdescriptorinfo "descriptor"

Analyses a descriptor.

bitcoin-cli getdescriptorinfo "wpkh([d34db33f/84h/0h/0h]0279be667ef9dcbbac55a06295Ce870b07029Bfcdb2dce28d959f2815b16f81798)"

getindexinfo ( "index_name" )

Returns the status of one or all available indices currently running in the node.

bitcoin-cli getindexinfo

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getindexinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

bitcoin-cli getindexinfo txindex

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getindexinfo", "params": [txindex]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

signmessagewithprivkey "privkey" "message"

Sign a message with the private key of an address

Create the signature:

bitcoin-cli signmessagewithprivkey "privkey" "my message"
Verify the signature:

bitcoin-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "signature" "my message"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "signmessagewithprivkey", "params": ["privkey", "my message"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

validateaddress "address"

Return information about the given bitcoin address.

bitcoin-cli validateaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "validateaddress", "params": ["bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

verifymessage "address" "signature" "message"

Verify a signed message

Unlock the wallet for 30 seconds:

bitcoin-cli walletpassphrase "mypassphrase" 30
Create the signature:

bitcoin-cli signmessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "my message"
Verify the signature:

bitcoin-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "signature" "my message"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "verifymessage", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", "signature", "my message"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

Wallet RPCs

abandontransaction "txid"

Mark in-wallet transaction <txid> as abandoned This will mark this transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent. It can be used to replace “stuck” or evicted transactions.It only works on transactions which are not included in a block and are not currently in the mempool. It has no effect on transactions which are already abandoned.

bitcoin-cli abandontransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "abandontransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

abortrescan

Stops current wallet rescan triggered by an RPC call, e.g. by an importprivkey call.

Note: Use “getwalletinfo” to query the scanning progress.

Import a private key:

bitcoin-cli importprivkey "mykey"

Abort the running wallet rescan:

bitcoin-cli abortrescan

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "abortrescan", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

ddmultisigaddress nrequired ["key",...] ( "label" "address_type" )

Add an nrequired-to-sign multisignature address to the wallet. Requires a new wallet backup.

Each key is a Bitcoin address or hex-encoded public key.

This functionality is only intended for use with non-watchonly addresses.

See importaddress for watchonly p2sh address support.

If ‘label’ is specified, assign address to that label.

Add a multisig address from 2 addresses:

bitcoin-cli addmultisigaddress 2 "[\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\",\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\"]"

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "addmultisigaddress",

backupwallet "destination"

Safely copies current wallet file to destination, which can be a directory or a path with filename.

bitcoin-cli backupwallet "backup.dat"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "backupwallet", "params": ["backup.dat"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

bumpfee "txid" ( options )

Bumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.

bitcoin-cli bumpfee <txid>

createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup )

Creates and loads a new wallet.

bitcoin-cli createwallet "testwallet"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createwallet", "params": ["testwallet"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

dumpprivkey "address"

Reveals the private key corresponding to ‘address’.

Then the importprivkey can be used with this output

bitcoin-cli dumpprivkey "myaddress"

bitcoin-cli importprivkey "mykey"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "dumpprivkey", "params": ["myaddress"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

umpwallet "filename"

Dumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.

bitcoin-cli dumpwallet "test"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "dumpwallet", "params": ["test"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

encryptwallet "passphrase"

Encrypts the wallet with ‘passphrase’. This is for first time encryption.

Encrypt your wallet:

bitcoin-cli encryptwallet "my pass phrase"
Now set the passphrase to use the wallet, such as for signing or sending bitcoin:

bitcoin-cli walletpassphrase "my pass phrase"
Now we can do something like sign:

bitcoin-cli signmessage "address" "test message"
Now lock the wallet again by removing the passphrase:

bitcoin-cli walletlock
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "encryptwallet", "params": ["my pass phrase"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getaddressesbylabel "label"

Returns the list of addresses assigned the specified label.

bitcoin-cli getaddressesbylabel "tabby"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getaddressesbylabel", "params": ["tabby"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getaddressinfo "address"

Return information about the given bitcoin address.

Some of the information will only be present if the address is in the active wallet.

bitcoin-cli getaddressinfo "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getaddressinfo", "params": ["bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getbalance ( "dummy" minconf include_watchonly avoid_reuse )

Returns the total available balance.

The total amount in the wallet with 0 or more confirmations:

bitcoin-cli getbalance
The total amount in the wallet with at least 6 confirmations:

bitcoin-cli getbalance "*" 6
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getbalance", "params": ["*", 6]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getbalances

Returns an object with all balances in BTC.

bitcoin-cli getbalances
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getbalances", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getnewaddress ( "label" "address_type" )

Returns a new Bitcoin address for receiving payments.

If ‘label’ is specified, it is added to the address book so payments received with the address will be associated with ‘label’.

bitcoin-cli getnewaddress
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnewaddress", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getrawchangeaddress ( "address_type" )

Returns a new Bitcoin address, for receiving change.

bitcoin-cli getrawchangeaddress
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrawchangeaddress", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getreceivedbyaddress "address" ( minconf )

Returns the total amount received by the given address in transactions with at least minconf confirmations.

The amount from transactions with at least 1 confirmation:

bitcoin-cli getreceivedbyaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"
The amount including unconfirmed transactions, zero confirmations:

bitcoin-cli getreceivedbyaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 0
The amount with at least 6 confirmations:

bitcoin-cli getreceivedbyaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 6
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getreceivedbyaddress", "params": ["bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl", 6]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getreceivedbylabel "label" ( minconf )

Returns the total amount received by addresses with <label> in transactions with at least [minconf] confirmations.

Amount received by the default label with at least 1 confirmation:

bitcoin-cli getreceivedbylabel ""
Amount received at the tabby label including unconfirmed amounts with zero confirmations:

bitcoin-cli getreceivedbylabel "tabby" 0
The amount with at least 6 confirmations:

bitcoin-cli getreceivedbylabel "tabby" 6
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getreceivedbylabel", "params": ["tabby", 6]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

gettransaction "txid" ( include_watchonly verbose )

Get detailed information about in-wallet transaction <txid>

bitcoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"

bitcoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d" true

bitcoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d" false true
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "gettransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

getunconfirmedbalance

DEPRECATED Identical to getbalances().mine.untrusted_pending


getwalletinfo

Returns an object containing various wallet state info.

bitcoin-cli getwalletinfo
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getwalletinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

importaddress "address" ( "label" rescan p2sh )

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.

Import an address with rescan:

bitcoin-cli importaddress "myaddress"
Import using a label without rescan:

bitcoin-cli importaddress "myaddress" "testing" false
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "importaddress", "params": ["myaddress", "testing", false]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

importdescriptors "requests"

Import descriptors. This will trigger a rescan of the blockchain based on the earliest timestamp of all descriptors being imported. Requires a new wallet backup.

bitcoin-cli importdescriptors '[{ "desc": "<my descriptor>", "timestamp":1455191478, "internal": true }, { "desc": "<my desccriptor 2>", "label": "example 2", "timestamp": 1455191480 }]'

bitcoin-cli importdescriptors '[{ "desc": "<my descriptor>", "timestamp":1455191478, "active": true, "range": [0,100], "label": "<my bech32 wallet>" }]'

importmulti "requests" ( "options" )

Import addresses/scripts (with private or public keys, redeem script (P2SH)), optionally rescanning the blockchain from the earliest creation time of the imported scripts. Requires a new wallet backup.

bitcoin-cli importmulti '[{ "scriptPubKey": { "address": "<my address>" }, "timestamp":1455191478 }, { "scriptPubKey": { "address": "<my 2nd address>" }, "label": "example 2", "timestamp": 1455191480 }]'

bitcoin-cli importmulti '[{ "scriptPubKey": { "address": "<my address>" }, "timestamp":1455191478 }]' '{ "rescan": false}'

importprivkey "privkey" ( "label" rescan )

Adds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup.

Dump a private key:

bitcoin-cli dumpprivkey "myaddress"
Import the private key with rescan:

bitcoin-cli importprivkey "mykey"
Import using a label and without rescan:

bitcoin-cli importprivkey "mykey" "testing" false
Import using default blank label and without rescan:

bitcoin-cli importprivkey "mykey" "" false
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "importprivkey", "params": ["mykey", "testing", false]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

importprunedfunds "rawtransaction" "txoutproof"

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 "pubkey" ( "label" rescan )

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.

Import a public key with rescan:

bitcoin-cli importpubkey "mypubkey"
Import using a label without rescan:

bitcoin-cli importpubkey "mypubkey" "testing" false
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "importpubkey", "params": ["mypubkey", "testing", false]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

importwallet "filename"

Imports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.

Dump the wallet:

bitcoin-cli dumpwallet "test"
Import the wallet:

bitcoin-cli importwallet "test"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "importwallet", "params": ["test"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

keypoolrefill ( newsize )

Fills the keypool.

Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

bitcoin-cli keypoolrefill
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "keypoolrefill", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

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.

bitcoin-cli listaddressgroupings
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listaddressgroupings", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

listlabels ( "purpose" )

Returns the list of all labels, or labels that are assigned to addresses with a specific purpose.

List all labels:

bitcoin-cli listlabels
List labels that have receiving addresses:

bitcoin-cli listlabels receive
List labels that have sending addresses:

bitcoin-cli listlabels send
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listlabels", "params": [receive]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

listlockunspent

Returns list of temporarily unspendable outputs.

List the unspent transactions:

bitcoin-cli listunspent
Lock an unspent transaction:

bitcoin-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
List the locked transactions:

bitcoin-cli listlockunspent
Unlock the transaction again:

bitcoin-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e7
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listlockunspent", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" )

List balances by receiving address.

bitcoin-cli listreceivedbyaddress

bitcoin-cli listreceivedbyaddress 6 true
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listreceivedbyaddress", "params": [6, true, true]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listreceivedbyaddress", "params": [6, true, true, "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

listreceivedbylabel ( minconf include_empty include_watchonly )

List received transactions by label.

bitcoin-cli listreceivedbylabel

bitcoin-cli listreceivedbylabel 6 true
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listreceivedbylabel", "params": [6, true, true]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed )

Get all transactions in blocks since block [blockhash], or all transactions if omitted.

bitcoin-cli listsinceblock

bitcoin-cli listsinceblock "000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad" 6
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listsinceblock", "params": ["000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad", 6]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

listtransactions ( "label" count skip include_watchonly )

If a label name is provided, this will return only incoming transactions paying to addresses with the specified label.

List the most recent 10 transactions in the systems:

bitcoin-cli listtransactions
List transactions 100 to 120:

bitcoin-cli listtransactions "*" 20 100
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listtransactions", "params": ["*", 20, 100]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

listunspent ( minconf maxconf ["address",...] include_unsafe query_options )

Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations.

bitcoin-cli listunspent

bitcoin-cli listunspent 6 9999999 "[\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\",\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\"]"

bitcoin-cli listunspent 6 9999999 '[]' true '{ "minimumAmount": 0.005 }'
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listunspent", "params": [6, 9999999 "[\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\",\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\"]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listunspent", "params": [6, 9999999, [] , true, { "minimumAmount": 0.005 } ]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

listwalletdir

Returns a list of wallets in the wallet directory.

bitcoin-cli listwalletdir
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listwalletdir", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

listwallets

Returns a list of currently loaded wallets.

For full information on the wallet, use “getwalletinfo”

bitcoin-cli listwallets
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "listwallets", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

loadwallet "filename" ( load_on_startup )

Loads a wallet from a wallet file or directory.

bitcoin-cli loadwallet "test.dat"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "loadwallet", "params": ["test.dat"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

lockunspent unlock ( [{"txid":"hex","vout":n},...] )

Updates list of temporarily unspendable outputs.

List the unspent transactions:

bitcoin-cli listunspent
Lock an unspent transaction:

bitcoin-cli lockunspent false "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
List the locked transactions:

bitcoin-cli listlockunspent
Unlock the transaction again:

bitcoin-cli lockunspent true "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "lockunspent", "params": [false, "[{\"txid\":\"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0\",\"vout\":1}]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

psbtbumpfee "txid" ( options )

Bumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B.

Returns a PSBT instead of creating and signing a new transaction.

bitcoin-cli psbtbumpfee <txid>

removeprunedfunds "txid"

Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.

bitcoin-cli removeprunedfunds "a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "removeprunedfunds", "params": ["a8d0c0184dde994a09ec054286f1ce581bebf46446a512166eae7628734ea0a5"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

rescanblockchain ( start_height stop_height )

Rescan the local blockchain for wallet related transactions.

bitcoin-cli rescanblockchain 100000 120000
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "rescanblockchain", "params": [100000, 120000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

send [{"address":amount},{"data":"hex"},...] ( conf_target "estimate_mode" fee_rate options )

EXPERIMENTAL warning: this call may be changed in future releases.

Send a transaction.

Send 0.1 BTC with a confirmation target of 6 blocks in economical fee estimate mode:

bitcoin-cli send '{"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl": 0.1}' 6 economical
Send 0.2 BTC with a fee rate of 1.1 sat/vB using positional arguments:

bitcoin-cli send '{"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl": 0.2}' null "unset" 1.1
Send 0.2 BTC with a fee rate of 1 sat/vB using the options argument:

bitcoin-cli send '{"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl": 0.2}' null "unset" null '{"fee_rate": 1}'
Send 0.3 BTC with a fee rate of 25 sat/vB using named arguments:

bitcoin-cli -named send outputs='{"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl": 0.3}' fee_rate=25
Create a transaction that should confirm the next block, with a specific input, and return result without adding to wallet or broadcasting to the network:

bitcoin-cli send '{"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl": 0.1}' 1 economical '{"add_to_wallet": false, "inputs": [{"txid":"a08e6907dbbd3d809776dbfc5d82e371b764ed838b5655e72f463568df1aadf0", "vout":1}]}'

sendmany "" {"address":amount} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" fee_rate verbose )

Send multiple times. Amounts are double-precision floating point numbers.

Send two amounts to two different addresses::

bitcoin-cli sendmany "" "{\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\":0.01,\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\":0.02}"

Send two amounts to two different addresses setting the confirmation and comment::

bitcoin-cli sendmany "" "{\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\":0.01,\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\":0.02}" 6 "testing"

Send two amounts to two different addresses, subtract fee from amount::

bitcoin-cli sendmany "" "{\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\":0.01,\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\":0.02}" 1 "" "[\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\",\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\"]"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "sendmany", "params": ["", {"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl":0.01,"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3":0.02}, 6, "testing"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/


sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode" avoid_reuse fee_rate verbose )

Send an amount to a given address.

Send 0.1 BTC:

bitcoin-cli sendtoaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 0.1

Send 0.1 BTC with a confirmation target of 6 blocks in economical fee estimate mode using positional arguments:

bitcoin-cli sendtoaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 0.1 "donation" "sean's outpost" false true 6 economical

Send 0.1 BTC with a fee rate of 1.1 sat/vB, subtract fee from amount, BIP125-replaceable, using positional arguments:

bitcoin-cli sendtoaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 0.1 "drinks" "room77" true true null "unset" null 1.1

Send 0.2 BTC with a confirmation target of 6 blocks in economical fee estimate mode using named arguments:

bitcoin-cli -named sendtoaddress address="bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" amount=0.2 conf_target=6 estimate_mode="economical"

Send 0.5 BTC with a fee rate of 25 sat/vB using named arguments:

bitcoin-cli -named sendtoaddress address="bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" amount=0.5 fee_rate=25

bitcoin-cli -named sendtoaddress address="bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" amount=0.5 fee_rate=25 subtractfeefromamount=false replaceable=true avoid_reuse=true comment="2 pizzas" comment_to="jeremy" verbose=true

sethdseed ( newkeypool "seed" )

Set or generate a new HD wallet seed. Non-HD wallets will not be upgraded to being a HD wallet. Wallets that are already HD will have a new HD seed set so that new keys added to the keypool will be derived from this new seed.

bitcoin-cli sethdseed 

bitcoin-cli sethdseed false

bitcoin-cli sethdseed true "wifkey"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "sethdseed", "params": [true, "wifkey"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

setlabel "address" "label"

Sets the label associated with the given address.

bitcoin-cli setlabel "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" "tabby"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "setlabel", "params": ["bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl", "tabby"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

settxfee amount

Set the transaction fee per kB for this wallet. Overrides the global -paytxfee command line parameter.

Can be deactivated by passing 0 as the fee. In that case automatic fee selection will be used by default.

bitcoin-cli settxfee 0.00001
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "settxfee", "params": [0.00001]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

setwalletflag "flag" ( value )

Change the state of the given wallet flag for a wallet.

bitcoin-cli setwalletflag avoid_reuse
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "setwalletflag", "params": ["avoid_reuse"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

signmessage "address" "message"

Sign a message with the private key of an address Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

Unlock the wallet for 30 seconds:

bitcoin-cli walletpassphrase "mypassphrase" 30
Create the signature:

bitcoin-cli signmessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "my message"
Verify the signature:

bitcoin-cli verifymessage "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" "signature" "my message"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "signmessage", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", "my message"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )

Sign inputs for raw transaction (serialized, hex-encoded).

bitcoin-cli signrawtransactionwithwallet "myhex"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "signrawtransactionwithwallet", "params": ["myhex"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

unloadwallet ( "wallet_name" load_on_startup )

Unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument.

bitcoin-cli unloadwallet wallet_name
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "unloadwallet", "params": [wallet_name]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

upgradewallet ( version )

Upgrade the wallet. Upgrades to the latest version if no version number is specified.

bitcoin-cli upgradewallet 169900
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "upgradewallet", "params": [169900]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

walletcreatefundedpsbt ( [{"txid":"hex","vout":n,"sequence":n},...] ) [{"address":amount},{"data":"hex"},...] ( locktime options bip32derivs )

Creates and funds a transaction in the Partially Signed Transaction format.

bitcoin-cli walletcreatefundedpsbt "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"

walletlock

Removes the wallet encryption key from memory, locking the wallet.

Set the passphrase for 2 minutes to perform a transaction:

bitcoin-cli walletpassphrase "my pass phrase" 120
Perform a send (requires passphrase set):

bitcoin-cli sendtoaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 1.0
Clear the passphrase since we are done before 2 minutes is up:

bitcoin-cli walletlock
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "walletlock", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

walletpassphrase "passphrase" timeout

Stores the wallet decryption key in memory for ‘timeout’ seconds.

Unlock the wallet for 60 seconds:

bitcoin-cli walletpassphrase "my pass phrase" 60
Lock the wallet again (before 60 seconds):

bitcoin-cli walletlock
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "walletpassphrase", "params": ["my pass phrase", 60]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

walletpassphrasechange "oldpassphrase" "newpassphrase"

Changes the wallet passphrase from ‘oldpassphrase’ to ‘newpassphrase’.

bitcoin-cli walletpassphrasechange "old one" "new one"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "walletpassphrasechange", "params": ["old one", "new one"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs )

Update a PSBT with input information from our wallet and then sign inputs that we can sign for.

bitcoin-cli walletprocesspsbt "psbt"

NFT Generator - Zoot Chain
Generate Unlimited NFTs Without Any Coding Skills ZootChain’s Advanced NFT Generator Software Allows You To Create Thousands Of NFTs At The Comfort Of Your Home – Zero Coding Skills Required Yes, I Want To Start Generating NFTs Previous Next Create Your Own NFT Collection From Scratch Are you lookin…
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to BlockMeadow.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.