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.
Path Params
-
coinstring requiredA cryptocurrency or token ticker symbol. -
walletIdstring requiredThe wallet ID.
Query Params
-
enforceMinConfirmsForChangebooleanEnforcesminConfirmson change inputs -
feeRateinteger -
limitintegerMaximum number of results to return. If the result set is truncated, use thenextBatchPrevIdvalue to get the next batch. -
maxFeeRateinteger -
maxValuestring or integerMaximum value of each unspent in base units (e.g. satoshis). For doge, only string is allowed. -
minConfirmsintegerMinimum number of confirmations for the collected inputs. Only applies to external unspents. UseenforceMinConfirmsForChangeto filter change as well. -
minHeightnumberMinimum block height of the unspents -
minValuestring or integerMinimum 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
numBlocksto estimate the fee rate by targeting confirmation within a given number of blocks. If bothfeeRateandnumBlocksare absent, the transaction defaults to 2 blocks for confirmation.Note: The
maxFeeRatelimits the fee rate generated bynumBlocks. -
unspentIdsarray of strings
Responses
200
OK
Response Body
object
-
coinstringA cryptocurrency or token ticker symbol. -
maximumSpendablestring
400
Bad Request
Response Body
ONE OF
-
errorstring requiredHuman-readable error message -
requestIdstring requiredClient request id -
contextobjectProperties that apply to a specific error name -
namestring requiredError code
-
errorstring requiredHuman-readable error message -
requestIdstring requiredClient request id -
contextobject requiredcontext object
-
idstring
-
-
namestring enum requiredError codeInvalidWalletId
404
Not Found
Response Body
object
-
errorstring requiredHuman-readable error message -
requestIdstring requiredClient request id -
contextobjectProperties that apply to a specific error name -
namestring requiredError code