Overview

You can view the unspent transaction output (UTXO) for any wallet containing UTXO-based coins. This is helpful, because every outgoing transaction includes a certain amount of UTXO to cover blockchain fees. Therefore, the UTXO locked to transactions pending approval impacts the available UTXO in your wallet.

Prerequisites

Cookbook

Need just the steps? Expand the cookbook below to get started:

View UTXOOpen Cookbook

Steps

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 walletInstance = await bitgo.coin(coin).wallets().get({id: walletId});
    walletInstance.unspents().then(function (unspents) {
        // print unspents
        console.dir(unspents);
    });
}

main().catch((err) => console.error(err));

Step Result

{
  "coin": "tbtc4",
  "unspents": [
    {
      "id": "a4b7c2d1e3f5908172a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f80:0",
      "address": "tb1qgrgcsu2dkvfcte8q52za3htkmwgmj8qh6ktq973zsz3qhlg0ny8q8ajtdd",
      "value": 100000,
      "valueString": "100000",
      "blockHeight": 141632,
      "date": "2026-06-25T16:16:09.000Z",
      "wallet": "5e8d3f1a2b7c4e9d0f1a2b3c",
      "fromWallet": "5d1a4b7c9e2f3a8d0b5c6e7f",
      "chain": 20,
      "index": 0,
      "witnessScript": "5221034ab17c91d582b9c3e285fccb8b8c6e31e1a9d7f2b543c0e1d6a7f8b9c2d4e5f2102a1b2c3d4e5f607182930a1b2c3d4e5f607182930a1b2c3d4e5f607182930a121039b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b853ae",
      "isSegwit": true
    }
  ],
  "resultMessage": "success"
}

See Also

API Reference: List Unspents on a wallet