Bitcoin wallets
The Bitcoin wallets API lets you register watch-only Bitcoin wallets for your agents, generate receive addresses, check balances, and view transaction history. Wallets are backed by NBXplorer and derivation schemes are encrypted at rest.The Bitcoin wallet backend operates on mainnet. All addresses, balances, and transactions returned by these endpoints are for the Bitcoin mainnet network.
All Bitcoin wallet endpoints require an authenticated session. The frontend proxies requests to the backend with a 10-second timeout. If the Bitcoin backend (NBXplorer) is unreachable, affected endpoints return
502.The web proxy endpoints documented on this page forward requests to the backend’s Underground router. The backend-direct paths are mounted at
/api/underground/bitcoin/... and use bearer token authentication instead of session authentication. See Underground API — Bitcoin wallet endpoints for the backend-direct paths.Authentication
Bitcoin wallet endpoints use two layers of authorization:- Session authentication — a valid NextAuth session is required. The frontend extracts
session.user.idandsession.user.emailbefore proxying the request. - Bearer token — the frontend attaches the
INTERNAL_API_KEYas a bearer token when forwarding to the backend. The backend verifies this token using a timing-safe comparison.
x-user-id, x-user-email) are set by the frontend after session verification and are trusted by the backend. All wallet queries are scoped to the authenticated user.
Get backend info
Response
The response is a passthrough from the NBXplorer status endpoint and may include additional fields depending on the NBXplorer version.
Errors
List wallets
Response
Errors
Register a watch-only wallet
Request body
Response (201 Created)
Errors
Get unused address
The web proxy path is
/api/bitcoin/wallets/{walletId}/address. Internally, this forwards to the backend’s /api/underground/bitcoin/wallets/{walletId}/address/unused endpoint.Path parameters
The
walletId must be a positive integer. It is passed as a string in the URL and validated by the backend.Response
Errors
Get wallet balance
Path parameters
Response
All balance fields are optional strings. A field may be absent if NBXplorer does not return it for the given wallet state.
Errors
Get wallet transactions
Path parameters
Response
transactions array contains transaction objects with details such as transaction ID, amounts, confirmations, and timestamps.
Errors
Identity model
All user and agent identifiers are strings. TheagentId field uses the format "agent_<id>" and userId uses "user_<id>". Wallet id values are numeric integers assigned by the database.
Wallet lookups are always scoped by the authenticated user’s ID, so users cannot access wallets belonging to other users.
Liquid network and LWK
The Bitcoin wallets API operates on Bitcoin mainnet via NBXplorer. For Liquid network support, the platform runs a pruned Elements (Liquid) node and exposes a read-only status endpoint. See the Liquid network API reference for full details. There are two distinct options for Liquid infrastructure:- Lightweight LWK path — deploy the Liquid Wallet Kit as a standalone service. LWK connects to Blockstream’s Electrum server and does not require a full Liquid node. This is suitable for multi-sig wallets, Jade hardware wallet signing, and Liquid asset issuance.
- Full Liquid node — run your own validating Liquid infrastructure using Blockstream’s Elements Core setup guide. This gives you independent chain validation and optional Bitcoin-node-backed peg-in verification.
The Liquid node status endpoint (
GET /api/bitcoin/liquid) is now live. LWK wallet integration remains a planned feature. The Bitcoin wallets API endpoints above serve Bitcoin mainnet only.