Documentation Index
Fetch the complete documentation index at: https://home.1151.to/llms.txt
Use this file to discover all available pages before exploring further.
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"
}
| Field | Type | Required | Notes |
|---|
api_key | string | ✓ | Customer API key. |
wallet_id | string | ✓ | Accepts wallet ID, address, or wallet name. |
Response
{
"result": "ok",
"utxos": [
{
"txid": "c93f...",
"vout": 0,
"address": "bc1q...",
"amount_btc": 0.005,
"confirmations": 12,
"script": "0014..."
}
]
}
| Field | Description |
|---|
txid | Transaction hash containing the output. |
vout | Output index within the transaction. |
amount_btc | Value in BTC. |
confirmations | Blockchain confirmations. |
script | Output script in hex. |
Errors
| Status | Payload | When 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.