listunspent

Back to wallet

Wallet

Summary

Returns array of unspent transaction outputs

Description

Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations. Optionally filter to only include txouts paid to specified addresses.

Arguments

  • minconf (NUM): The minimum confirmations to filter
  • maxconf (NUM): The maximum confirmations to filter
  • addresses (ARR): The qbit addresses to filter
  • address (STR): qbit address
  • include_unsafe (BOOL): Include outputs that are not safe to spend See description of "safe" attribute below.
  • query_options (OBJ_NAMED_PARAMS): No description.
  • minimumAmount (AMOUNT): Minimum value of each UTXO in QBT
  • maximumAmount (AMOUNT): Maximum value of each UTXO in QBT
  • maximumCount (NUM): Maximum number of UTXOs
  • minimumSumAmount (AMOUNT): Minimum sum value of all UTXOs in QBT
  • include_immature_coinbase (BOOL): Include immature coinbase UTXOs

Results

  • value (ARR): No description.
  • value (OBJ): No description.
    • txid (STR_HEX): the transaction id
    • vout (NUM): the vout value
    • address (STR, optional): the qbit address
    • label (STR, optional): The associated label, or "" for the default label
    • scriptPubKey (STR): the output script
    • amount (STR_AMOUNT): the transaction output amount in QBT
    • confirmations (NUM): The number of confirmations
    • ancestorcount (NUM, optional): The number of in-mempool ancestor transactions, including this one (if transaction is in the mempool)
    • ancestorsize (NUM, optional): The virtual transaction size of in-mempool ancestors, including this one (if transaction is in the mempool)
    • ancestorfees (STR_AMOUNT, optional): The total fees of in-mempool ancestors (including this one) with fee deltas used for mining priority in sat (if transaction is in the mempool)
    • redeemScript (STR_HEX, optional): The redeem script if the output script is P2SH
    • witnessScript (STR, optional): witness script if the output script is P2WSH or P2SH-P2WSH
    • spendable (BOOL): (DEPRECATED) Always true
    • solvable (BOOL): Whether we know how to spend this output, ignoring the lack of keys
    • reused (BOOL, optional): (only present if avoid_reuse is set) Whether this output is reused/dirty (sent to an address that was previously spent from)
    • desc (STR, optional): (only when solvable) A descriptor for spending this output
    • parent_descs (ARR): List of parent descriptors for the output script of this coin.
    • desc (STR): The descriptor string.
    • safe (BOOL): Whether this output is considered safe to spend. Unconfirmed transactions from outside keys and unconfirmed replacement transactions are considered unsafe and are not eligible for spending by fundrawtransaction and sendtoaddress.

Examples

qbit-cli listunspent
qbit-cli listunspent 6 9999999 "[\"qb1zqqqsyqcyq5rqwzqfpg9scrgwpugpzysnzs23v9ccrydpk8qarc0sjq57mw\",\"qb1zyqsjygeyy5nzw2pf9g4jctfw9ucrzv3nxs6nvdec8yark0pa8clsj9cmtx\"]"
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "listunspent", "params": [6, 9999999 "[\"qb1zqqqsyqcyq5rqwzqfpg9scrgwpugpzysnzs23v9ccrydpk8qarc0sjq57mw\",\"qb1zyqsjygeyy5nzw2pf9g4jctfw9ucrzv3nxs6nvdec8yark0pa8clsj9cmtx\"]"]}' -H 'content-type: application/json' http://127.0.0.1:8352/
qbit-cli listunspent 6 9999999 '[]' true '{ "minimumAmount": 0.005 }'
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "listunspent", "params": [6, 9999999, [] , true, { "minimumAmount": 0.005 } ]}' -H 'content-type: application/json' http://127.0.0.1:8352/