QTUM RPC API
Qtum-RPC-API
This document includes the full list of Qtum RPCs based on Qtum core v0.17.6. According to this document you can learn how to use Qtum RPC API.
Tables of Contents
Generating
Wallet
listaccounts
Blockchain
callcontract
callcontract "address" "data" ( address )
Argument:
Test example:
Test result:
getaccountinfo
Contract details including balance, storage data and code
Argument:
Result:
Test example:
getbestblockhash
Returns the hash of the best (tip) block in the longest blockchain.
Result:
Examples:
Test example:
Test result:
getblock
According the blockhash returns the info of the corresponding 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 . If verbosity is 2, returns an Object with information about block and information about each transaction.
Arguments:
Result (for verbosity = 0):
Result (for verbosity = 1):
Result (for verbosity = 2):
Examples:
test examples:
Test result:
getblockchaininfo
Returns an object containing various state info regarding blockchain processing.
Result:
Test example:
Test result:
getblockcount
Returns the number of blocks in the longest blockchain.
Result:
Examples:
Test example:
Test result:
getblockhash
Returns hash of block in best-block-chain at height provided.
Arguments:
Result:
Examples:
Test example:
Test result:
getblockheader
Returns the corresponding block header information according to the given index 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 .
Arguments:
Result (for verbose = true):
Result (for verbose = false):
Examples:
Test example:
Test result:
getblockstats
Compute per block statistics for a given window. All amounts are in satoshis. It won't work for some heights with pruning. It won't work without -txindex for utxo_size_inc, *fee or *feerate stats.
Arguments:
Result:
Examples:
getchaintips
Return information about all known tips in the block tree, including the main chain as well as orphaned branches.
Result:
Possible values for status:
"invalid" This branch contains at least one invalid block
"headers-only" Not all blocks for this branch are available, but the headers are valid
"valid-headers" All blocks are available for this branch, but they were never fully validated
"valid-fork" This branch is not part of the active chain, but is fully validated
"active" This is the tip of the active main chain, which is certainly valid
Examples:
Test example:
Result:
getchaintxstats
Compute statistics about the total number and rate of transactions in the chain.
Arguments:
Result:
Examples:
Test result:
getdifficulty
Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
Returns the proof-of-stake difficulty as a multiple of the minimum difficulty.
Result:
Examples:
Test example:
Test result:
getmempoolancestors
If txid is in the mempool, returns all in-mempool ancestors.
Arguments:
Result (for verbose = false):
Result (for verbose=true):
Examples:
Test example:
Test result:
getmempooldescendants
If txid is in the mempool, returns all in-mempool descendants.
Arguments:
Result (for verbose = false):
Result (for verbose=true):
Examples:
Test result:
getmempoolentry
Returns mempool data for given transaction
Arguments:
Result:
Examples:
getmempoolinfo
Returns details on the active state of the TX memory pool.
Result:
Examples:
Test example:
Test result:
getrawmempool
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.
Arguments:
Result: (for verbose = false):
Examples:
Test example:
Test result:
getstorage
Get data stored by smart contracts
Argument:
Examples:
Test example:
Test result:
gettransactionreceipt
requires -logevents to be enabled
Argument:
Result:
Test result:
gettxout
Returns details about an unspent transaction output.
Arguments:
Result:
Examples:
Get unspent transactions
View the details
As a json rpc call
gettxoutproof
Returns a hex-encoded proof that "txid" was included in a block.
NOTE: By default this function only works sometimes. This is when there is an unspent output in the utxo for this transaction. To make it always work, you need to maintain a transaction index, using the -txindex command line option or specify the block in which the transaction is included manually (by blockhash).
Arguments:
Result:
Test example:
Test result:
gettxoutsetinfo
Returns statistics about the unspent transaction output set. Note this call may take some time.
Result:
Examples:
listcontracts
list all the contracts and default accounts is 20
Argument:
Test example:
Result:
preciousblock
Treats a block as if it were received before others with the same work.
A later preciousblock call can override the effect of an earlier one.
The effects of preciousblock are not retained across restarts.
Arguments:
Examples:
pruneblockchain
prune the spend tx to reduce the size of the block
Arguments:
Result:
Examples:
savemempool
Dumps the mempool to disk. It will fail until the previous dump is fully loaded.
Examples:
scantxoutset
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. Examples of output descriptors are: addr() Outputs whose scriptPubKey corresponds to the specified address (does not include P2PK) raw() Outputs whose scriptPubKey equals the specified hex scripts combo() P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH outputs for the given pubkey pkh() P2PKH outputs for the given pubkey sh(multi(,,,...)) P2SH-multisig outputs for the given threshold and pubkeys
In the above, either refers to a fixed public key in hexadecimal notation, or to an xpub/xprv optionally followed by one or more path elements separated by "/", and optionally ending in "/" (unhardened), or "/'" or "/*h" (hardened) to specify all unhardened or hardened child keys. In the latter case, a range needs to be specified by below if different from 1000. For more information on output descriptors, see the documentation in the doc/descriptors.md file.
Arguments:
Result:
searchlogs
requires -logevents to be enabled
Arguments:
Examples:
verifychain
Verifies blockchain database.
Arguments:
Result:
Examples:
verifytxoutproof
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
Arguments:
Result:
Test example:
Test result:
waitforlogs
waitforlogs (fromBlock) (toBlock) (filter) (minconf) requires -logevents to be enabled
Waits for a new logs and return matching log entries. When the call returns, it also specifies the next block number to start waiting for new logs. By calling waitforlogs repeatedly using the returned nextBlock number, a client can receive a stream of up-to-date log entires.
This call is different from the similarly named waitforlogs. This call returns individual matching log entries, searchlogs returns a transaction receipt if one of the log entries of that transaction matches the filter conditions.
Arguments:
Result:
Sample Output:
Control
echo
echo|echojson "message" ...
Simply echo back the input arguments. This command is for testing.
The difference between echo and echojson is that echojson has argument conversion enabled in the client-side table inqtum-cli and the GUI. There is no server-side difference.
getmemoryinfo
Returns an object containing information about memory usage.
Arguments:
Result (mode "stats"):
Result (mode "mallocinfo"):
Examples:
help
List all commands, or get help for a specified command.
Arguments:
Result:
logging
Gets and sets the logging configuration.
When called without an argument, returns the list of categories with status that are currently being debug logged or not.
When called with arguments, adds or removes categories from debug logging and return the lists above. The arguments are evaluated in order "include", "exclude".
If an item is both included and excluded, it will thus end up being excluded.
The valid logging categories are: net, tor, mempool, http, bench, zmq, db, rpc, estimatefee, addrman, selectcoins, reindex, cmpctblock, rand, prune, proxy, mempoolrej, libevent, coindb, qt, leveldb, coinstake, http-poll.
In addition, the following are available as category names with special meanings:
"all", "1" : represent all logging categories.
"none", "0" : even if other logging categories are specified, ignore all of them.
Arguments:
Result:
Examples:
stop
Stop Qtum server.
uptime
Returns the total uptime of the server.
Result:
ttt (numeric) The number of seconds that the server has been running
Examples:
Generating
generate
Mine up to nblocks blocks immediately (before the RPC call returns) to an address in the wallet.
Arguments:
Result:
Examples:
Generate 11 blocks
generatetoaddress
Mine blocks immediately to a specified address (before the RPC call returns)
Arguments:
Result:
Examples:
Mining
getblocktemplate
If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'. It returns data needed to construct a block to work on. For full specification, see BIPs 22, 23, 9, and 145: https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki https://github.com/bitcoin/bips/blob/master/bip-0023.mediawiki https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki#getblocktemplate_changes https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki
Arguments:
Result:
getmininginfo
Returns a json object containing mining-related information.
Examples:
Result:
Test example:
Test result:
getnetworkhashps
Returns the estimated network hashes per second based on the last n blocks (for PoW only). Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change. Pass in [height] to estimate the network speed at the time when a certain block was found.
Arguments:
Result:
Examples:
Test result:
getstakinginfo
Returns an object containing staking-related information.
Example:
Result:
Test example:
Test result:
getsubsidy
Returns subsidy value for the specified value of target.
prioritisetransaction
Accepts the transaction into mined blocks at a higher (or lower) priority
Arguments:
Result:
Examples:
submitblock
Attempts to submit new block to network. See https://en.bitcoin.it/wiki/BIP_0022 for full specification.
Arguments:
Examples:
Network
addnode
Attempts to add or remove a node from the addnode list. Or try a connection to a node once. Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be full nodes/support SegWit as other outbound peers are (though such peers will not be synced from).
Arguments:
Examples:
clearbanned
Clear all banned IPs.
Examples:
disconnectnode
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.
Arguments:
Examples:
estimaterawfee
WARNING: This interface is unstable and may disappear or change!
WARNING: This is an advanced API call that is tightly coupled to the specific implementation of fee estimation. The parameters it can be called with and the results it returns will change if the internal implementation changes.
Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within conf_target blocks if possible. Uses virtual transaction size as defined in BIP 141 (witness data is discounted).
Arguments:
Result:
Example:
getaddednodeinfo
Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here)
Arguments:
Result:
Examples:
getconnectioncount
Returns the number of connections to other nodes.
Result:
Examples:
Test example:
Test result:
getnettotals
Returns information about network traffic, including bytes in, bytes out, and current time.
Result:
Examples:
getnetworkinfo
Returns an object containing various state info regarding P2P networking.
Result:
Examples:
getpeerinfo
Returns data about each connected network node as a json array of objects.
Result:
Examples:
Test example:
Test result::
listbanned
List all banned IPs/Subnets.
Examples:
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. Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.
Examples:
setban
setban "subnet" "add|remove" (bantime) (absolute)
Attempts to add or remove an IP/Subnet from the banned list.
Arguments:
Examples:
setnetworkactive
Disable/enable all p2p network activity.
Arguments:
Rawtransactions
combinepsbt
Combine multiple partially signed Qtum transactions into one transaction. Implements the Combiner role.
Arguments:
Result:
Examples:
combinerawtransaction
Combine multiple partially signed transactions into one transaction. The combined transaction may be another partially signed transaction or a fully signed transaction.
Arguments:
Result:
Examples:
converttopsbt
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.
Arguments:
Result:
Examples:
Create a transaction
Convert the transaction to a PSBT
createpsbt
Creates a transaction in the Partially Signed Transaction format. Implements the Creator role.
Arguments:
Result:
Examples:
createrawtransaction
createrawtransaction [{"txid":"id","vout":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.
Arguments:
Result:
Examples:
decodepsbt
Return a JSON object representing the serialized, base64-encoded partially signed Qtum transaction.
Arguments:
Result:
Examples:
decoderawtransaction
Return a JSON object representing the serialized, hex-encoded transaction.
Arguments:
Result:
Examples:
Test example:
Test result:
decodescript
Decode a hex-encoded script.
Arguments:
Result:
Examples:
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.
Arguments:
Result:
Examples:
fromhexaddress
Converts a raw hex address to a base58 pubkeyhash address
Arguments:
Result:
Examples:
Test example:
Test result:
fundrawtransaction
Add inputs to a transaction until it has enough in value to meet its out value. This will not modify existing inputs, and will add at most one change output to the outputs. No existing outputs will be modified unless "subtractFeeFromOutputs" is specified. Note that inputs which were signed may need to be resigned after completion since in/outputs have been added. The inputs added will not be signed, use signrawtransaction for that. Note that all existing inputs must have their previous output transaction be in the wallet. Note that all inputs selected must be of standard form and P2SH scripts must be in the wallet using importaddress or addmultisigaddress (to calculate fees). You can see whether this is the case by checking the "solvable" field in the listunspent output. Only pay-to-pubkey, multisig, and P2SH versions thereof are currently supported for watch-only
Arguments:
Result:
Examples:
Create a transaction with no inputs
Add sufficient unsigned inputs to meet the output value
Sign the transaction
Send the transaction
gethexaddress
Converts a base58 pubkeyhash address to a hex address for use in smart contracts.
Arguments:
Result:
Examples:
Test example:
Test result:
getrawtransaction
NOTE: By default this function only works for mempool transactions. If the -txindex option is enabled, it also works for blockchain transactions. If the block which contains the transaction is known, its hash can be provided even for nodes without -txindex. Note that if a blockhash is provided, only that block will be searched and if the transaction is in the mempool or other blocks, or if this node does not have the given block available, the transaction will not be found. DEPRECATED: for now, it also works for transactions with unspent outputs.
Return the raw transaction data.
If verbose is 'true', returns an Object with information about 'txid'. If verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.
Arguments:
Examples:
sendrawtransaction
Submits raw transaction (serialized, hex-encoded) to local node and network.
Also see createrawtransaction and signrawtransaction calls.
Arguments:
Result:
Examples:
Create a transaction
Sign the transaction, and get back the hex
Send the transaction (signed hex)
As a json rpc call
signrawtransaction
DEPRECATED. Sign inputs for raw transaction (serialized, hex-encoded). The second optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain. The third optional argument (may be null) is an array of base58-encoded private keys that, if given, will be the only keys used to sign the transaction.
Arguments:
Result:
signrawtransactionwithkey
Sign inputs for raw transaction (serialized, hex-encoded). The second argument is an array of base58-encoded private keys that will be the only keys used to sign the transaction. The third optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain.
Arguments:
Result:
Examples:
testmempoolaccept
Returns if raw transaction (serialized, hex-encoded) would be accepted by mempool.
This checks if the transaction violates the consensus or policy rules.
See sendrawtransaction call.
Arguments:
Result:
Examples:
Create a transaction
Test acceptance of the transaction (signed hex)
As a json rpc call
Util
createmultisig
Creates a multi-signature address with n signature of m keys required. It returns a json object with the address and redeemScript.
Arguments:
Result:
Examples:
Create a multisig address from 2 public keys
As a json rpc call
estimatesmartfee
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).
Arguments:
Result:
The request target will be clamped between 2 and the highest target fee estimation is able to return based on how long it has been running. An error is returned if not enough transactions and blocks have been observed to make an estimate for any number of blocks.
Example:
signmessagewithprivkey
Sign a message with the private key of an address
Arguments:
Result:
Examples:
Create the signature
Verify the signature
As json rpc
validateaddress
Return information about the given qtum address.
DEPRECATION WARNING: Parts of this command have been deprecated and moved to getaddressinfo. Clients must transition to using getaddressinfo to access this information before upgrading to v0.18. The following deprecated fields have moved to getaddressinfo and will only be shown here with -deprecatedrpc=validateaddress: ismine, iswatchonly, script, hex, pubkeys, sigsrequired, pubkey, addresses, embedded, iscompressed, account, timestamp, hdkeypath, kdmasterkeyid.
Arguments:
Result:
Examples:
verifymessage
Verify a signed message
Arguments:
Result:
Examples:
Unlock the wallet for 30 seconds
Create the signature
Verify the signature
As json rpc
Wallet
abandontransaction
Mark in-wallet transaction 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.
Arguments:
Examples:
abortrescan
Stops current wallet rescan triggered by an RPC call, e.g. by an importprivkey call.
Examples:
Import a private key
Abort the running wallet rescan
As a JSON-RPC call
Test example:
Test result:
addmultisigaddress
Add a nrequired-to-sign multisignature address to the wallet. Requires a new wallet backup. Each key is a Qtum 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.
Arguments:
Result:
Examples:
Add a multisig address from 2 addresses
As json rpc call
backupwallet
Safely copies current wallet file to destination, which can be a directory or a path with filename.
Arguments:
Examples:
bumpfee
Bumps the fee of an opt-in-RBF transaction T, replacing it with a new transaction B. An opt-in RBF transaction with the given txid must be in the wallet. The command will pay the additional fee by decreasing (or perhaps removing) its change output. If the change output is not big enough to cover the increased fee, the command will currently fail instead of adding new inputs to compensate. (A future implementation could improve this.) The command will fail if the wallet or mempool contains a transaction that spends one of T's outputs. By default, the new fee will be calculated automatically using estimatesmartfee. The user can specify a confirmation target for estimatesmartfee. Alternatively, the user can specify totalFee, or use RPC settxfee to set a higher fee rate. At a minimum, the new fee rate must be high enough to pay an additional new relay fee (incrementalfee returned by getnetworkinfo) to enter the node's mempool.
Arguments:
Result:
Examples:
createcontract
Create a contract with bytcode.
Arguments:
Result:
Examples:
createwallet
Creates and loads a new wallet.
Arguments:
Result:
Examples:
Test example:
Test result:
dumpprivkey
Reveals the private key corresponding to 'address'. Then the importprivkey can be used with this output
Arguments:
Result:
Examples:
dumpwallet
Dumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.
Arguments:
Result:
Examples:
encryptwallet
Encrypts the wallet with 'passphrase'. This is for first time encryption. After this, any calls that interact with private keys such as sending or signing will require the passphrase to be set prior the making these calls. Use the walletpassphrase call for this, and then walletlock call. If the wallet is already encrypted, use the wallet passphrase change call. Note that this will shutdown the server.
Arguments:
Examples:
Encrypt your wallet
Now set the passphrase to use the wallet, such as for signing or sending qtum
Now we can do something like sign
Now lock the wallet again by removing the passphrase
As a json rpc call
getaddressesbylabel
Returns the list of addresses assigned the specified label.
Arguments:
Result:
Examples:
Test example:
Test result:
getaddressinfo
Return information about the given qtum address. Some information requires the address to be in the wallet.
Arguments:
Result:
Examples:
Test example:
Test result:
getbalance
Returns the total available balance. The available balance is what the wallet considers currently spendable, and is thus affected by options which limit spendability such as -spendzeroconfchange.
Arguments:
Result:
Examples:
The total amount in the wallet with 1 or more confirmations
The total amount in the wallet at least 6 blocks confirmed
As a json rpc call
Test example:
Test result:
getnewaddress
Returns a new Qtum 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'.
Arguments:
Result:
Examples:
Test example:
Test result:
getrawchangeaddress
Returns a new Qtum address, for receiving change. This is for use with raw transactions, NOT normal use.
Arguments:
Result:
Examples:
Test example:
Test result:
getreceivedbyaddress
Returns the total amount received by the given address in transactions with at least minconf confirmations.
Arguments:
Result:
amount (numeric) The total amount in QTUM received at this address.
Examples:
The amount from transactions with at least 1 confirmation
The amount including unconfirmed transactions, zero confirmations
The amount with at least 6 confirmations, very safe
As a json rpc call
gettransaction
Get detailed information about in-wallet transaction
Arguments:
Result:
Examples:
getunconfirmedbalance
Returns the server's total unconfirmed balance
getwalletinfo
Returns an object containing various wallet state info.
Result:
Examples:
importaddress
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.
Arguments:
Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported address exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes. If you have the full public key, you should call importpubkey instead of this.
Note: If you import a non-standard raw script in hex form, outputs sending to it will be treated as change, and not show up in many RPCs.
Examples:
Import an address with rescan
Import using a label without rescan
As a JSON-RPC call
importmulti
Import addresses/scripts (with private or public keys, redeem script (P2SH)), rescanning all addresses in one-shot-only (rescan can be disabled via options). Requires a new wallet backup.
Arguments:
Examples:
importprivkey
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.
Arguments:
Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported key exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.
Examples:
Dump a private key
Import the private key with rescan
Import using a label and without rescan
Import using default blank label and without rescan
As a JSON-RPC call
importprunedfunds
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.
Arguments:
listreceivedbyaddress
List balances by receiving address.
Arguments:
Result:
importpubkey
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.
Arguments:
Examples:
Import a public key with rescan
Import using a label without rescan
As a JSON-RPC call
importwallet
Imports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.
Arguments:
Examples:
Dump the wallet
Import the wallet
Import using the json rpc call
keypoolrefill
Fills the keypool.
Arguments:
Examples:
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
Result:
Examples:
listlabels
Returns the list of all labels, or labels that are assigned to addresses with a specific purpose.
Arguments:
Result:
Examples:
List all labels
List labels that have receiving addresses
List labels that have sending addresses
As json rpc call
listlockunspent
Returns list of temporarily unspendable outputs. See the lockunspent call to lock and unlock transactions for spending.
Result:
Examples:
List the unspent transactions
Lock an unspent transaction
List the locked transactions
Unlock the transaction again
As a json rpc call
Examples:
listsinceblock
Get all transactions in blocks since block [blockhash], or all transactions if omitted. If "blockhash" is no longer a part of the main chain, transactions from the fork point onward are included. Additionally, if include_removed is set, transactions affecting the wallet which were removed are returned in the "removed" array.
Arguments:
Result:
Examples:
listtransactions
If a label name is provided, this will return only incoming transactions paying to addresses with the specified label.
Returns up to 'count' most recent transactions skipping the first 'from' transactions.
Note that the "account" argument and "otheraccount" return value have been removed in V0.17. To use this RPC with an "account" argument, restart qtumd with -deprecatedrpc=accounts
Arguments:
Result:
Examples:
List the most recent 10 transactions in the systems
List transactions 100 to 120
As a json rpc call
listreceivedbylabel
List received transactions by label.
Arguments:
Result:
Examples:
listunspent
Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations.
Optionally filter to only include txouts paid to specified addresses.
Arguments:
Result:
Examples:
listwallets
Returns a list of currently loaded wallets. For full information on the wallet, use "getwalletinfo"
Result:
Examples:
loadwallet
loadwallet "filename"
Loads a wallet from a wallet file or directory. Note that all wallet command-line options used when starting qtumd will be applied to the new wallet (eg -zapwallettxes, upgradewallet, rescan, etc).
Arguments:
Result:
Examples:
lockunspent
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.
A locked transaction output will not be chosen by automatic coin selection, when spending qtums.
Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list is always cleared (by virtue of process exit) when a node stops or fails. Also see the listunspent call.
Arguments:
Result:
Examples:
List the unspent transactions
Lock an unspent transaction
List the locked transactions
Unlock the transaction again
As a json rpc call
removeprunedfunds
Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.
Arguments:
Examples:
As a JSON-RPC call
rescanblockchain
Rescan the local blockchain for wallet related transactions.
Arguments:
Result:
Examples:
reservebalance
Set reserve amount not participating in network protection. If no parameters provided current setting is printed.
sendmany
Send multiple times. Amounts are double-precision floating point numbers. Note that the "fromaccount" argument has been removed in V0.17. To use this RPC with a "fromaccount" argument, restart qtumd with -deprecatedrpc=accounts
Requires wallet passphrase to be set with walletpassphrase call.
Arguments:
Result:
Examples:
Send two amounts to two different addresses:
Send two amounts to two different addresses setting the confirmation and comment:
Send two amounts to two different addresses, subtract fee from amount:
As a json rpc call
sendmanywithdupes
Send multiple times. Amounts are double-precision floating point numbers. Supports duplicate addresses Requires wallet passphrase to be set with walletpassphrase call.
Arguments:
Result:
Examples:
Send two amounts to two different addresses:
Send two amounts to two different addresses setting the confirmation and comment:
Send two amounts to two different addresses, subtract fee from amount:
As a json rpc call
sendtoaddress
Send an amount to a given address.
Requires wallet passphrase to be set with walletpassphrase call.
Arguments:
Result:
Examples:
sendtocontract
Send funds and data to a contract.
Requires wallet passphrase to be set with walletpassphrase call.
Arguments:
Result:
Examples:
sethdseed
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.
Note that you will need to MAKE A NEW BACKUP of your wallet after setting the HD wallet seed.
Requires wallet passphrase to be set with walletpassphrase call.
Arguments:
Examples:
settxfee
settxfee amount
Set the transaction fee per kB for this wallet. Overrides the global -paytxfee command line parameter.
Arguments:
Results:
Examples:
signmessage
Sign a message with the private key of an address
Arguments:
Result:
Examples:
Unlock the wallet for 30 seconds
Create the signature
Verify the signature
As json rpc
signrawtransactionwithwallet
Sign inputs for raw transaction (serialized, hex-encoded). The second optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain.
Arguments:
Result:
Examples:
unloadwallet
Unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument. Specifying the wallet name on a wallet endpoint is invalid.
Arguments:
Examples:
walletcreatefundedpsbt
Creates and funds a transaction in the Partially Signed Transaction format. Inputs will be added if supplied inputs are not enough Implements the Creator and Updater roles.
Arguments:
Result:
Examples:
Create a transaction with no inputs
walletlock
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.
Examples:
Set the passphrase for 2 minutes to perform a transaction
Perform a send (requires passphrase set)
Clear the passphrase since we are done before 2 minutes is up
As json rpc call
walletpassphrase
Stores the wallet decryption key in memory for 'timeout' seconds.
This is needed prior to performing transactions related to private keys such as sending QTUM and staking
Arguments:
Examples:
Unlock the wallet for 60 seconds
Lock the wallet again (before 60 seconds)
Unlock the wallet for staking only, for a long time
As json rpc call
walletpassphrasechange
Changes the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.
Arguments:
Examples:
walletprocesspsbt
Update a PSBT with input information from our wallet and then sign inputs
that we can sign for.
Arguments:
Result:
Examples:
zmq
getzmqnotifications
Returns information about the active ZeroMQ notifications.
Result:
Examples:
Last updated