listunspent - Zcash 5.10.0 RPC

listunspent ( minconf maxconf ["address",...] includeUnsafe queryOptions asOfHeight )

Returns array of unspent transparent transaction outputs with between minconf and
maxconf (inclusive) confirmations. Use `z_listunspent` instead to see information
related to unspent shielded notes. Results may be optionally filtered to only include
txouts paid to specified addresses.

Arguments:
1. minconf          (numeric, optional, default=1) The minimum confirmations to filter
2. maxconf          (numeric, optional, default=9999999) The maximum confirmations to filter
3. "addresses"    (string) A json array of Zcash addresses to filter
    [
      "address"   (string) Zcash address
      ,...
    ]
4. includeUnsafe    (bool, optional, default=true) Include outputs that are not safe to spend. Currently, only the default value is supported.
5. queryOptions     (object, optional, default={}) JSON with query options. Currently, only the default value is supported.
6. asOfHeight       (numeric, optional, default=-1) Execute the query as if it
                    were run when the blockchain was at the height specified by
                    this argument. The default is to use the entire blockchain
                    that the node is aware of. -1 can be used as in other RPC
                    calls to indicate the current height (including the
                    mempool), but this does not support negative values in
                    general. A “future” height will fall back to the current
                    height. Any explicit value will cause the mempool to be
                    ignored, meaning no unconfirmed tx will be considered.
                    `minconf` must be at least 1 when `asOfHeight` is provided.

Result
[                   (array of json object)
  {
    "txid" : "txid",          (string) the transaction id 
    "vout" : n,               (numeric) the vout value
    "generated" : true|false  (boolean) true if txout is a coinbase transaction output
    "address" : "address",    (string) the Zcash address
    "scriptPubKey" : "key",   (string) the script key
    "amount" : x.xxx,         (numeric) the transaction amount in ZEC
    "amountZat" : xxxx        (numeric) the transaction amount in zatoshis
    "confirmations" : n,      (numeric) The number of confirmations
    "redeemScript" : n        (string) The redeemScript if scriptPubKey is P2SH
    "spendable" : xxx         (bool) Whether we have the private keys to spend this output
  }
  ,...
]

Bitcoin compatibility:
Compatible up to five arguments, but can only use the default value for `includeUnsafe` and `queryOptions`.
Examples
> zcash-cli listunspent 
> zcash-cli listunspent 6 9999999 "[\"t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\",\"t1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\"]"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listunspent", "params": [6, 9999999 "[\"t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\",\"t1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8232/


Maintained by @_garethtdavies; modified by: mdr0id;license of the docs is MIT (see zcash repo), license of the scripts and webpage is also MIT (github repo)

Note it uses a mainnet zcash node