listunspent - Bitcoin

listunspent. Returns a list of all unspent transaction outputs (UTXOs) currently available in the Bitcoin node's wallet

listunspent - bitcoin [Value: 30CU]
Lists unspent transaction outputs for addresses.
Use cases

Use cases

  • List unspent transaction outputs (UTXOs) in a wallet
  • Analyze available funds for spending
  • Audit wallet UTXO details
Constraints

Constraints

  • Requires a synced wallet
  • Only lists UTXOs for the specified addresses
  • Depends on node sync
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl  -X POST \
 --url ' https://bitcoin.drpc.org' \
 --header 'Content-Type: application/json' \
 --data '{"jsonrpc": "1.0", "id": "curltest", "method": "listunspent", "params": [6, 9999999, [] , true, { "minimumAmount": 0.005 } ]}'
Copy
Response
200
{
    "jsonrpc": "1.0",
    "id": "curltest",
    "result": [
        {
            "txid": "abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef",
            "vout": 0,
            "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
            "amount": 0.01,
            "confirmations": 10,
            "scriptPubKey": "76a914abcdefabcdefabcdefabcdefabcdef88ac"
        },
        {
            "txid": "abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef",
            "vout": 1,
            "address": "1dice8EMZmqKvrGE4Qc9sPzT2vG4nJ2A7",
            "amount": 0.005,
            "confirmations": 15,
            "scriptPubKey": "76a9141234567890abcdefabcdefabcdef88ac"
        }
    ]
}

Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersobject
object
minconfnumeric
Optional. Default is 1. The minimum confirmations to filter.
maxconfnumeric
Optional. Default is 9999999. The maximum confirmations to filter.
addressesarray
Optional. Default is an empty array. The Bitcoin addresses to filter.
include_unsafeboolean
Optional. Default is true. Include outputs that are not safe to spend.
query_optionsobject
Optional. JSON object with query options.
object
minimumAmountnumeric
Optional. Default is 0. Minimum value of each UTXO in BTC.
maximumAmountnumeric
Optional. Default is unlimited. Maximum value of each UTXO in BTC.
maximumCountnumeric
Optional. Default is unlimited. Maximum number of UTXOs.
minimumSumAmountnumeric
Optional. Default is unlimited. Minimum sum value of all UTXOs in BTC.

Response

200

Response params

object
idinteger
jsonrpcstring
resultobject
object
outputsarray
A JSON array of transaction outputs.
object
txidstring
The transaction ID.
voutnumber
The vout value.
addressstring
The Bitcoin address.
labelstring
The associated label, or an empty string for the default label.
scriptPubKeystring
The script key.
amountnumber
The transaction output amount in BTC.
confirmationsnumber
The number of confirmations.
redeemScriptstring
The redeemScript if scriptPubKey is P2SH.
witnessScriptstring
The witnessScript if the scriptPubKey is P2WSH or P2SH-P2WSH.
spendableboolean
Whether we have the private keys to spend this output.
solvableboolean
Whether we know how to spend this output, ignoring the lack of keys.
reusedboolean
Whether this output is reused/dirty (only present if avoid_reuse is set).
descstring
A descriptor for spending this output (only when solvable).
safeboolean
Whether this output is considered safe to spend. Unconfirmed transactions from outside keys and unconfirmed replacement transactions are considered unsafe.