latestOpenAPI 3.0.32026-08-224982,0272.8 MB

e445c15e5bee

Wallet

Get maximum spendable

Returns the maximum amount that can be spent with a single transaction on the wallet.

The maximum spendable amount can differ from a wallet’s total balance. A transaction can only use up to 200 unspents. Wallets that have more than 200 unspents cannot spend the full balance in one transaction. Additionally, the value returned for the maximum spendable amount accounts for the current fee level by deducting the estimated fees. The amount will only be calculated based on the unspents that fit the parameters passed.

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

Path parameters

coinstring required

A cryptocurrency or token ticker symbol.

Example:btc
walletIdstring required
Example:59cd72485007a239fb00282ed480da1f

The wallet ID.

Query parameters

enforceMinConfirmsForChangeboolean

Enforces minConfirms on change inputs

feeRateinteger
limitinteger

Maximum number of results to return. If the result set is truncated, use the nextBatchPrevId value to get the next batch.

maxFeeRateinteger
string
OR
integer
Example:2000000

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.

minHeightnumber

Minimum block height of the unspents

string
OR
integer
Example:2000000

Minimum value of each unspent in base units (e.g. satoshis). For doge, only string is allowed.

numBlocksinteger

(BTC only) The number of blocks required to confirm a transaction. You can use numBlocks to estimate the fee rate by targeting confirmation within a given number of blocks. If both feeRate and numBlocks are absent, the transaction defaults to 2 blocks for confirmation.

Note: The maxFeeRate limits the fee rate generated by numBlocks.

unspentIdsUnspentId[]
[
  "003f688cc349f1fca8ac5ffa21671ca911b6ef351085c60733ed8c2ebf162cb8:2"
]

Response

OK

coinstring

A cryptocurrency or token ticker symbol.

maximumSpendablestring

Example response

{
  "coin": "btc",
  "maximumSpendable": "19948310"
}