Consolidate Account Balance

Overview

For account-based assets, the spendable balance of a wallet is the balance of the funds in the root address. In order to enable the maximum withdrawal from a wallet with multiple receive addresses, you must consolidate the balance by sweeping assets to the root address. The confirmed balance of a wallet is the balance of the root address plus all the receive addresses.

Some blockchains require a minimum balance in a receive address. When you consolidate a wallet, the minimum balance remains in the receive addresses. This results in your spendable balance being slightly less than your confirmed balance.

Consolidating is a transaction from your receive address to your root address. You can consolidate a maximum of 750 addresses per transaction, except for Solana, which has a limit of 500 addresses. Consolidation transactions follow the normal transaction flow, requiring signatures, approvals, and sending, as outlined in Wallets Overview.

Simple or Advanced

Similar to withdrawing, consolidating has 2 different flows that you can use depending on your use case. The simple flow uses either Express or the the JavaScript SDK. In the simple flow, you build, sign, and send the the consolidation transaction all in 1 step. The advanced flow uses either REST endpoints or the JavaScript SDK to build the consolidation transaction, and then sign and send it in separate calls.

This page documents both flows. Select the button bellow for the flow that works best for you:

  • Simple
  • Advanced

Prerequisites

Build, Sign, and Send Consolidation

Modify the following code to build, sing, and send a consolidation transaction, all in 1 step.

Endpoint: Consolidate Account (Simple)

  • cURL
  • JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 export BITGO_EXPRESS_HOST="<YOUR_LOCAL_HOST>" export COIN="<ASSET_ID>" export WALLET_ID="<YOUR_WALLET_ID>" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" export WALLET_PASSPHRASE="<WALLET_PASSPHRASE>" curl -X POST \ http://$BITGO_EXPRESS_HOST:3080/api/v2/$COIN/wallet/$WALLET_ID/consolidateAccount \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -d '{ "walletPassphrase": "'"$WALLET_PASSPHRASE"'" }'

Step Result

  • Custodial
  • Self-Managed

You receive a calendar invitation by email to schedule video verification with a BitGo operator.

Next

  • Custodial
  • Self-Managed
  1. If the transaction requires admin approval, it remains in a pending approval status until receiving final approval.
  2. Open the email from BitGo and select a date and time for video verification with a BitGo operator.

After verification, BitGo signs and broadcasts the transaction to the network for confirmation.

See Also