![]()
Every Bitcoin HD wallet generates hundreds of addresses from a single seed. If your app tracks balances one address at a time, you're writing the same boilerplate loop everyone else writes — and still missing change outputs.
xPub tracking is one slice of a broader category; for the full landscape see our guide to the best crypto wallet APIs.
An xPub API fixes that. Hand it an extended public key and it returns the aggregated balance, full transaction history, and portfolio value across every derived address — one call instead of hundreds.
The problem: most blockchain APIs still treat xPub support as an afterthought. Some only handle legacy address formats. Others cap derivation depth or charge per derived address. A few don't support xPub at all.
We tested five Bitcoin xPub APIs on what actually matters for production wallet integrations — format coverage, response speed, historical data, and cost. If you're building a portfolio tracker, tax tool, or custody dashboard, this is the shortlist.
Already familiar with crypto APIs in general? See our full breakdown of the best crypto API providers for developers in 2026.
A Bitcoin xPub — short for extended public key — is the master read-only key that an HD (hierarchical deterministic) wallet uses to generate every receiving address you see in your wallet app. Think of it as the root of a tree: from one xPub, the wallet derives address #0, #1, #2, and so on, without ever exposing private keys.
This matters for developers because tracking a Bitcoin wallet means tracking all of its derived addresses. Without xPub support, your API integration has to discover and query each address individually — a brittle approach that breaks every time the wallet generates a new one.
The naming gets confusing because Bitcoin has multiple address formats, each with its own extended key prefix:
Not every API that says "Bitcoin" on the landing page actually supports extended public keys well. Here are the six factors we weighted when testing.
CoinStats built its Bitcoin xPub API as a first-class feature, not a bolt-on. Submit an xpub, ypub, or zpub key and the API automatically derives all child addresses, scans each for balances, and aggregates the result into a single response. It handles Legacy, SegWit, Native SegWit, and Taproot addresses with automatic format detection from the key prefix.
What sets CoinStats apart is data richness beyond raw balances. Every transaction in the history includes the historical USD value at the time it occurred — critical for tax tools and P&L dashboards. The portfolio chart endpoint returns time-series value data across configurable periods (1d, 1w, 1m, 3m, 6m, 1y, all), so you can render wallet performance graphs without computing them client-side.
The API also includes a transaction sync endpoint that indexes the latest transactions on demand, which means your app doesn't need to poll or maintain its own indexer. Credits-based pricing is straightforward: 4,000 credits for an xPub balance call, 30 for transaction history, 40 for portfolio charts.
Key features:
Blockchain.com has offered xPub endpoints since the early days of Bitcoin development. Their /multiaddr endpoint accepts an xPub key and returns the aggregated balance plus recent transactions across all derived addresses. It's battle-tested and well-documented.
The free tier is generous for hobby projects and prototypes — no API key required for basic queries. Rate limits kick in at higher volumes, and the paid tiers unlock higher throughput.
The trade-off is data depth. Responses return raw BTC amounts without fiat valuations, so you'll need a separate price API to compute USD values. There are no portfolio chart endpoints — any time-series visualization is your responsibility to build. SegWit and Native SegWit support exists but the API doesn't auto-detect from the key prefix the way newer APIs do.
Key features:
Blockchair positions itself as the "Google for blockchains" and the analytics depth shows. Their xPub endpoint returns derived addresses, balances, and transaction data, but also layers on metadata like address type breakdowns and UTXO counts that other APIs skip.
The privacy angle is real — Blockchair doesn't require account creation for basic queries and doesn't log IP-to-xPub associations on their free tier. For privacy-sensitive applications, this matters.
Multi-chain support is a strength. Beyond Bitcoin, Blockchair covers Bitcoin Cash, Litecoin, Dogecoin, and several other UTXO chains with similar xPub endpoints. The downside is pricing: heavy xPub usage burns through the free API allowance quickly, and the paid tiers are positioned for enterprise rather than indie developers.
Key features:
BlockCypher takes a different approach to xPub support. Instead of a raw xPub endpoint, they offer an "HD Wallet" abstraction: you create a named wallet object from an xPub key, and then query that wallet for balances, addresses, and transactions. This adds a setup step but gives you persistent wallet state on their side.
The developer experience is a standout. Documentation is thorough with working code examples in curl, Python, Ruby, and JavaScript. Confidence factors on unconfirmed transactions are a unique feature — useful for payment verification flows.
The limitation is format support. BlockCypher's HD wallet feature works best with legacy xPub keys. SegWit and Native SegWit support exists through their address endpoints but the xPub-to-address derivation is less seamless for newer formats. Free tier allows 200 requests/hour — reasonable for development, tight for production.
Key features:
Mempool.space is the go-to open-source Bitcoin explorer, and their API reflects that mission. Address-level endpoints are solid — you can query any Bitcoin address for balance and transaction history. The catch: there's no dedicated xPub endpoint. You derive addresses client-side and query them individually.
The self-hosting story is what earns mempool its spot on this list. The entire stack (backend, Electrs indexer, frontend) is open-source and Docker-packaged. If your use case demands full sovereignty over the data pipeline — no third-party API calls at all — mempool is the only option here that lets you run everything locally.
For the hosted API at mempool.space, rate limits are strict and there's no paid tier for higher throughput. The API is donation-funded, so commercial usage at scale is better served by self-hosting.
Key features:
| Provider | xPub Support | Key Formats | Address Types | USD Valuations | Portfolio Charts | Multi-Chain |
|---|---|---|---|---|---|---|
| CoinStats API | Native | xpub, ypub, zpub | Legacy, SegWit, Native SegWit, Taproot | ✅ Historical | ✅ Yes | ✅ 50+ chains |
| Blockchain.com | Native | xpub (ypub/zpub partial) | Legacy, SegWit, Native SegWit | ❌ No | ❌ No | ❌ BTC only |
| Blockchair | Native | xpub, ypub, zpub | Legacy, SegWit, Native SegWit | ❌ No | ❌ No | ⚠️ UTXO chains only |
| BlockCypher | HD Wallet abstraction | xpub (ypub/zpub limited) | Legacy, SegWit (partial) | ❌ No | ❌ No | ⚠️ BTC, ETH, LTC, DOGE |
| Mempool.space | Address-level only | N/A (no xPub endpoint) | All (per-address queries) | ❌ No | ❌ No | ❌ BTC only |
If you're integrating the CoinStats API for Bitcoin xPub tracking, you're already connected to a much broader platform. Here's what else ships with the same API key.
Multi-chain wallet tracking. The same wallet endpoints that handle Bitcoin xPub keys also support Ethereum, Solana, Cosmos, and 50+ other chains. Add a wallet address from any supported chain and get balances, transactions, and portfolio analytics through identical response structures.
Exchange connections. Connect Binance, Coinbase, Kraken, and 100+ other exchanges via API keys. Pull balances, trade history, and P&L data alongside on-chain wallet data — one unified portfolio view through the API.
Market data at scale. Real-time prices, historical charts, market cap rankings, and token metadata for 20,000+ coins. The same infrastructure that powers the CoinStats app (5M+ users) is available through the public API.
Token security scores. Powered by Hexens, the token risks endpoint returns smart-contract audit results, rug-pull risk indicators, and holder concentration metrics. Useful for building safety checks into wallet UIs.
AI-ready with MCP. The CoinStats MCP Server lets AI agents query wallet data, market prices, and portfolio analytics directly. If you're building AI-powered crypto tools, the data layer is already agent-compatible.
Pay-per-use with x402. For developers who want usage-based pricing without subscriptions, CoinStats supports the x402 machine-payment protocol — pay per API call with stablecoins, no account required.
For most developers building Bitcoin wallet integrations, the choice comes down to how much work you want to do yourself. Every API on this list can return a Bitcoin balance. The difference is everything around it — format support, fiat valuations, portfolio analytics, and how far beyond Bitcoin your product needs to go.
CoinStats API covers the widest surface area: full xpub/ypub/zpub support, all four address formats, historical USD values, and portfolio charts — plus a multi-chain ecosystem for when your product grows. If you need one API that handles Bitcoin HD wallets and scales to everything else, start here.