Skip to main content
POST /wallet/utxos Returns the list of unspent transaction outputs (UTXOs) for a Bitcoin wallet.

Request

{
  "api_key": "sk_live_...",
  "wallet_id": "w_btc_493bb2e2-5e6e-4f06-9a84-8abf3c532eb7"
}
FieldTypeRequiredNotes
api_keystringCustomer API key.
wallet_idstringAccepts wallet ID, address, or wallet name.

Response

{
  "result": "ok",
  "utxos": [
    {
      "txid": "c93f...",
      "vout": 0,
      "address": "bc1q...",
      "amount_btc": 0.005,
      "confirmations": 12,
      "script": "0014..."
    }
  ]
}
FieldDescription
txidTransaction hash containing the output.
voutOutput index within the transaction.
amount_btcValue in BTC.
confirmationsBlockchain confirmations.
scriptOutput script in hex.

Errors

StatusPayloadWhen it happens
400{ "error": "Missing required fields" }Missing api_key or wallet_id.
403{ "error": "API key is not valid" }API key fails validation.
404{ "error": "Wallet not found" }Wallet does not exist or isn’t owned by your account.
400{ "error": "Wallet is not a BTC wallet" }Wallet belongs to another network.
500{ "error": "<message>" }Unexpected service error.

Examples

from py_1151 import Client

client = Client(api_key="sk_live_...")

utxos = client.get_utxos("w_btc_493bb2e2-5e6e-4f06-9a84-8abf3c532eb7")

for utxo in utxos:
    print(utxo.txid, utxo.vout, utxo.amount_btc)
These snippets return the same UTXO objects—use them to drive coin selection or display balances in whichever environment you prefer.