Bitcoin Core listunspent: Spendable, Solvable, and Safe UTXOs
The listunspent RPC enumerates unspent outputs known to a loaded Bitcoin Core wallet under the requested filters. It is a wallet-level view, not a complete enumeration of the network UTXO set. Each output is identified by its transaction ID and output index, commonly called an outpoint.
Querying confirmed and unconfirmed outputs
bitcoin-cli -rpcwallet=example listunspent 1 9999999
bitcoin-cli -rpcwallet=example listunspent 0 9999999 '[]' true
The first command requests outputs with at least one confirmation. The second permits zero confirmations and explicitly includes unsafe outputs. Neither command should be treated as a universal spend authorization. The response can contain amount, confirmations, scriptPubKey, spendable, solvable and safe fields, with additional metadata depending on the output and wallet.
Understanding the three flags
Spendable indicates whether the wallet reports that it has the private keys needed to spend an output. Solvable indicates whether the wallet knows how to construct a spending solution, ignoring the possible absence of private keys. Safe reflects the wallet's assessment of whether the output is suitable for automatic spending; unconfirmed external transactions and certain replacement-related outputs can be unsafe. These flags answer different questions. A solvable output may require an external signer, while an output with available keys can still be unsafe to select.
Filtering for a payment
An application should choose a confirmation threshold and safety policy appropriate to the payment. Track locked or reserved outpoints separately. Bitcoin Core wallet locks can exclude outputs from ordinary coin selection; application reservations also need concurrency control across workers. Do not assume that a previously returned output remains available when a later funding request runs.
Funding a transaction requires more than adding output amounts. Fees depend on transaction size, input types and output construction. Change may be necessary, and small outputs can cost more to spend than expected. A funding RPC or PSBT workflow can calculate a candidate transaction using the wallet's actual policy.
Rechecking before broadcast
A concurrent spend, mempool replacement or chain reorganization may invalidate a selection. Revalidate the candidate transaction and handle funding or broadcast errors explicitly. For externally signed wallets, verify the final transaction outputs and fee before approving signatures. The listunspent result is useful evidence for a funding decision, not a permanent reservation or guarantee of confirmation.
Primary references
https://bitcoincore.org/en/doc/28.0.0/rpc/wallet/listunspent/
https://bitcoincore.org/en/doc/28.0.0/rpc/wallet/lockunspent/
https://bitcoincore.org/en/doc/28.0.0/rpc/wallet/walletcreatefundedpsbt/
