Skip to main content

Wallet RPC Methods

Wallet RPCs provide functionality for managing wallets, creating and signing transactions, address management, and balance queries.
Wallet RPCs require the wallet component to be compiled in and at least one wallet to be loaded. Use the /wallet/<walletname>/ endpoint when multiple wallets are loaded.

Wallet Management

createwallet

Creates a new wallet.
string
Wallet name
string
Warning messages (if any)

loadwallet

Loads an existing wallet.

unloadwallet

Unloads a wallet from memory.

listwallets

Returns a list of currently loaded wallets.
array
Array of wallet names (strings)

getwalletinfo

Returns information about the wallet.
string
Wallet name
number
Wallet version
string
Database format (bdb, sqlite)
number
Total confirmed balance in BTC
number
Unconfirmed balance in BTC
number
Immature coinbase balance
number
Total number of transactions
number
Number of keys in keypool
number
Timestamp wallet is unlocked until (encrypted wallets only)
boolean
Whether wallet uses descriptors

Balance and UTXO Queries

getbalance

Returns the total available balance.
number
Total balance in BTC

getbalances

Returns detailed balance information.
object
Balances from outputs the wallet can sign
  • trusted: Confirmed balance
  • untrusted_pending: Unconfirmed balance
  • immature: Immature coinbase balance
object
Watch-only balances (same structure as mine)

listunspent

Returns array of unspent transaction outputs (UTXOs).
string
Transaction ID
number
Output index
string
Bitcoin address
number
Amount in BTC
number
Number of confirmations
boolean
Whether output is spendable
boolean
Whether output is solvable
boolean
Whether output is safe to spend

Address Management

getnewaddress

Generates a new receiving address.
string
New Bitcoin address

getrawchangeaddress

Generates a new address for receiving change.

getaddressinfo

Returns information about a given address.
string
The bitcoin address
boolean
Whether address belongs to wallet
boolean
Whether address is watch-only
boolean
Whether address is a script
string
Public key for address
string
Address label
string
HD keypath (if address is from HD wallet)

Sending Transactions

sendtoaddress

Sends bitcoin to a given address.
string
Transaction ID

sendmany

Sends bitcoin to multiple addresses in one transaction.
string
Transaction ID

send

Experimental RPC for creating and sending transactions with advanced options.

Transaction History

listtransactions

Returns list of transactions for the wallet.

gettransaction

Returns detailed information about an in-wallet transaction.
number
Amount in BTC (negative for sends)
number
Transaction fee (negative, only for sends)
number
Number of confirmations
string
Block hash containing transaction
string
Transaction ID
number
Transaction time
string
Raw transaction hex

Wallet Encryption

encryptwallet

Encrypts wallet with a passphrase. This is a one-time operation.
After encryption, the wallet will shut down. You must restart bitcoind to use the encrypted wallet.

walletpassphrase

Unlocks wallet for a period of time.

walletpassphrasechange

Changes wallet passphrase.

walletlock

Locks an encrypted wallet.