View Balances

Overview

BitGo enables you to retrieve the balances for all your wallets in any combination. For example, you can get the balance of:

  • All your cyrptocurrencies from all your wallets
  • Specific currencies
  • Specific wallets

Prerequisites

Steps

  • SDK
  • API
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 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()); })();

Step Result

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 { "balances": [ { "coin": "tbtc", "balanceString": "1322460", "confirmedBalanceString": "1322460" }, { "coin": "txlm", "balanceString": "99999999600", "confirmedBalanceString": "99999999600" }, { "coin": "txlm:BST-GBQTIOS3XGHB7LVYGBKQVJGCZ3R4JL5E4CBSWJ5ALIJUHBKS6263644L", "balanceString": "0", "confirmedBalanceString": "0" }, { "coin": "txlm:ABC-GBQTIOS3XGHB7LVYGBKQVJGCZ3R4JL5E4CBSWJ5ALIJUHBKS6263644L", "balanceString": "0", "confirmedBalanceString": "0" }, { "coin": "txlm:DEF-GBQTIOS3XGHB7LVYGBKQVJGCZ3R4JL5E4CBSWJ5ALIJUHBKS6263644L", "balanceString": "0", "confirmedBalanceString": "0" } ] }

See Also

API Reference: List Total Balances