View Total Balances
List total balances across all your wallets for each cryptocurrency. See the Guide.
-
You retrieve the total balances across all your wallets by calling the List Total Balances endpoint. The response returns each cryptocurrency with its balance and confirmed balance strings. This is useful for getting a high-level overview of your holdings without querying individual wallets.
Prerequisites: You must have completed Get Started and Create Wallets.
// 1. List Total Balances
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
curl -X GET \
https://app.bitgo-test.com/api/v2/wallet/balances \
-H "Authorization: Bearer $ACCESS_TOKEN"
// 1. List Total Balances
const BitGoJS = require('bitgo');
const bitgo = new BitGoJS.BitGo({ env: 'test' });
const promise = require('bluebird');
const coin = 'tltc';
const basecoin = bitgo.coin(coin);
// Set your access token here
const accessToken = null;
const walletId = '5941ce2db42fcbc70717e5a898fd1595';
promise.coroutine(function *() {
bitgo.authenticateWithAccessToken({ accessToken: accessToken });
const walletInstance = yield basecoin.wallets().get({ id: walletId });
console.log('Wallet ID:', walletInstance.id());
console.log('Current Receive Address:', walletInstance.receiveAddress());
console.log('Balance:', walletInstance.balanceString());
console.log('Confirmed Balance:', walletInstance.confirmedBalanceString());
console.log('Spendable Balance:', walletInstance.spendableBalanceString());
})();
Response
// 1. List Total Balances Response
{
"balances": [
{
"coin": "tbtc4",
"balanceString": "1322460",
"confirmedBalanceString": "1322460",
"spendableBalanceString": "1322460"
},
{
"coin": "tlnbtc",
"balanceString": "0",
"confirmedBalanceString": "0",
"spendableBalanceString": "0",
"offchain": {
"inboundBalance": "0",
"inboundPendingBalance": "0",
"inboundUnsettledBalance": "0",
"outboundBalance": "0",
"outboundPendingBalance": "0",
"outboundUnsettledBalance": "0",
"outboundLockedBalance": "0",
"outboundReservedBalance": "0",
"outboundSpendableBalance": "0"
}
},
{
"coin": "tsol",
"balanceString": "3000000",
"confirmedBalanceString": "3000000",
"spendableBalanceString": "542864"
},
{
"coin": "tsol:usdc",
"balanceString": "0",
"confirmedBalanceString": "0",
"spendableBalanceString": "0"
}
]
}