View Wallet
Retrieve wallet details including addresses and balances by wallet ID. See the Guide.
-
You retrieve a wallet details by providing the coin type and wallet ID. The response includes wallet metadata, keys, balance information, the receive address, and coin-specific configuration.
Every BitGo wallet has a unique wallet ID that identifies it on its respective blockchain. Even though wallets may have multiple receive addresses, each wallet has only one wallet ID.
Prerequisites: You must have completed Get Started and Create Wallets.
// 1. Get Wallet
export COIN="tbtc4"
export WALLET_ID="<YOUR_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
curl -X GET \
https://app.bitgo-test.com/api/v2/$COIN/wallet/$WALLET_ID \
-H "Authorization: Bearer $ACCESS_TOKEN"
// 1. Get Wallet
import * as dotenv from "dotenv";
import {EnvironmentName} from "bitgo";
import {BitGoAPI} from "@bitgo/sdk-api";
import {Tbtc4} from "@bitgo/sdk-coin-btc";
dotenv.config();
const bitgo = new BitGoAPI({
env: process.env.ENV as EnvironmentName,
accessToken: process.env.TESTNET_ACCESS_TOKEN
});
const coin = 'tbtc4';
bitgo.register(coin, Tbtc4.createInstance);
const walletId = process.env.WALLET_ID;
async function main() {
const wallet = await bitgo.coin(coin).wallets().get({id: walletId});
console.dir(wallet._wallet);
}
main().catch((err) => console.error(err));
Response
// 1. Get Wallet Response
{
"id": "63bc8506e014900008265c65363245f4",
"users": [
{
"user": "62ab90e06dfda30007974f0a52a12995",
"permissions": [
"admin",
"view",
"spend"
]
}
],
"coin": "hteth",
"label": "NFT Wallet (1)",
"m": 2,
"n": 3,
"keys": [
"63bc8505f4df3c000793bfd753bcef4f",
"63bc85058426ee00073e74fdf5418927",
"62c5ae7f74ac860007aff0cb9bcf93a6"
],
"keySignatures": {},
"enterprise": "62c5ae8174ac860007aff138a2d74df7",
"organization": "62c5ae8174ac860007aff1555ffb960d",
"bitgoOrg": "BitGo Trust",
"tags": [
"63bc8506e014900008265c65363245f4",
"62c5ae8174ac860007aff138a2d74df7"
],
"disableTransactionNotifications": false,
"freeze": {},
"deleted": false,
"approvalsRequired": 1,
"isCold": false,
"coinSpecific": {
"baseAddress": "0x7be0205683657c1a025aca0cb4ad2b9b37c74ff0",
"feeAddress": "0x90e1d81e6ac41c71c3e19a2e787b38e21063edb3",
"pendingChainInitialization": false,
"walletVersion": 2,
"pendingDeployment": false,
"enableNFT": true
},
"admin": {
"policy": {
"date": "2023-01-01T00:00:00.000Z",
"id": "63bc8506e014900008265c65363245f4",
"label": "default",
"rules": [],
"version": 0,
"latest": true
}
},
"clientFlags": [],
"walletFlags": [],
"allowBackupKeySigning": false,
"recoverable": false,
"startDate": "2022-12-29T18:16:54.000Z",
"type": "hot",
"buildDefaults": {},
"customChangeKeySignatures": {},
"hasLargeNumberOfAddresses": false,
"multisigType": "onchain",
"hasReceiveTransferPolicy": false,
"creator": "62ab90e06dfda30007974f0a52a12995",
"walletFullyCreated": true,
"config": {},
"balance": 1000000000000000,
"balanceString": "1000000000000000",
"rbfBalance": 1000000000000000,
"rbfBalanceString": "1000000000000000",
"confirmedBalance": 1000000000000000,
"confirmedBalanceString": "1000000000000000",
"spendableBalance": 1000000000000000,
"spendableBalanceString": "1000000000000000",
"unspentCount": 0,
"receiveAddress": {
"id": "63bc8507e014900008265d292c356e72",
"address": "0x7be0205683657c1a025aca0cb4ad2b9b37c74ff0",
"chain": 0,
"index": 0,
"coin": "hteth",
"wallet": "63bc8506e014900008265c65363245f4",
"coinSpecific": {
"nonce": -1,
"updateTime": "2022-12-29T18:16:54.948Z",
"txCount": 0,
"pendingChainInitialization": false,
"creationFailure": [],
"pendingDeployment": false,
"forwarderVersion": 2,
"isTss": false,
"isNonceLocked": false
}
},
"pendingApprovals": []
}