REST APIWallet & TransactWallet

GET

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

  • coin string required
    A cryptocurrency or token ticker symbol.
  • walletId string required
    The wallet ID.

    matches ^[0-9a-f]{32}$

Query Params

  • enforceMinConfirmsForChange boolean
    Enforces minConfirms on change inputs
  • feeRate integer

    >= 0

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

    >= 1 · <= 500

    Defaults to 25

  • maxFeeRate integer

    >= 0

  • maxValue string or integer
    Maximum value of each unspent in base units (e.g. satoshis). For doge, only string is allowed.
  • minConfirms integer
    Minimum number of confirmations for the collected inputs. Only applies to external unspents. Use enforceMinConfirmsForChange to filter change as well.

    >= 0

  • minHeight number
    Minimum block height of the unspents

    >= 0

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

    (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.

    >= 1 · <= 1000

    Defaults to 2

  • unspentIds array of strings

    at least 1 items

Responses

200
OK

Response Body

object

  • coin string
    A cryptocurrency or token ticker symbol.
  • maximumSpendable string
400
Bad Request

Response Body

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
404
Not Found

Response Body

object

  • 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