Get unspents

get/api/v2/{coin}/wallet/{walletId}/unspents

Returns unspent transaction outputs for a wallet

Path Parameters

  • coinstringRequired
    A cryptocurrency or token ticker symbol.
    Example: btc
  • walletIdstringRequired
    Example: 59cd72485007a239fb00282ed480da1f
    Pattern: ^[0-9a-f]{32}$

Query Parameters

  • limitintegerDefault: 25
    Maximum number of results to return. If the result set is truncated, use the 'nextBatchPrevId' value to get the next batch.
    Minimum: >= 1
    Maximum: <= 500
  • maxValuestring or integer
    Maximum value of each unspent in base units (e.g. satoshis). For doge, only string is allowed.
  • minConfirmsinteger
    Minimum number of confirmations for the collected inputs. Only applies to external unspents. Use 'enforceMinConfirmsForChange' to filter change as well.
    Minimum: >= 0
  • enforceMinConfirmsForChangeboolean
    Enforces 'minConfirms' on change inputs
  • minHeightnumber
    Minimum block height of the unspents
    Minimum: >= 0
  • minValuestring or integer
    Minimum value of each unspent in base units (e.g. satoshis). For doge, only string is allowed.
  • prevIdstring
    Return the next batch of results, based on the 'nextBatchPrevId' value from the previous batch.
    Example: 59cd72485007a239fb00282ed480da1f
    Pattern: ^[0-9a-f]{32}$
  • segwitboolean
    DEPRECATED. Mutually exclusive with 'chains'. Returns only 'p2shP2wsh' unspents/addresses on true. Returns only 'p2sh' unspents/addresses on false. Equivalent to passing 10 and 11 as the only value in 'chains' on true, 0 and 1 on false.
  • includeRbfboolean
    True, if including Replace-By-Fee (RBF) unspents.

200 Response

coin string
A cryptocurrency or token ticker symbol.
Example: btc
unspents array[object]
id string
The id of the unspent in the form <txid>:<tx_index>
Example: 003f688cc349f1fca8ac5ffa21671ca911b6ef351085c60733ed8c2ebf162cb8:2
address string
The address of this unspent
Example: 2MsKxhhkDo5WaLaYRGA9Cr3iSQPyXsu6Fi2
value integer
valueString string
Example: 2000000
Match pattern: ^-?\d+$
blockHeight integer
The block this Unspent was created in
date string <date-time>
The date this unspent was created
Example: 2017-03-25T23:01:40.248Z
coinbase boolean
True if this unspent came from the coinbase transaction
wallet string
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
fromWallet string
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
chain integer
The type of this unspent's address (P2SH, P2WSH, etc...)
Example: 0
index integer
A monotonic counter used when creating new addresses
redeemScript string
The Script program used to cryptographically verify spending this unspent
Example: 522102f1e990044d2a8be43d5b500bbdcb36277b97a4b07e01c5101ae8ec1568bfd6532103dab7dc82f2fc8c28200c1bdeca9c4cf181e0ca257395829cbd599395048afb57210205422e711827d8356f2fb75334d863941dd7eb45bd5788fa231dc5fa755135b653ae
witnessScript string
The segwit Script program used to cryptographically verify spending this unspent
Example: 52210351311cd81144e6cbdba561d24dfc22644cb02d053339d4beace03231b3be4f372103a8d0c1a375b9ee1a2411f9f8e18373be7f228b18260f63bbfca48809170ed08b2103c3bd8bd074657bbe9ee6714b31a4a54b6fd5b5cda0e1030122f9bf46b5034f6b53ae
isSegwit boolean

400 Response

One of
error string required
Human-readable error message
requestId string required
Client request id
context object
Properties that apply to a specific error name
name string required
Error code

403 Response

error string required
Human-readable error message
requestId string required
Client request id
context object
Properties that apply to a specific error name
name string required
Error code

404 Response

error string required
Human-readable error message
requestId string required
Client request id
context object
Properties that apply to a specific error name
name string required
Error code