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.

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.

Quick verdict
CoinStats API is the best Bitcoin xPub API for most developers. It handles xpub, ypub, and zpub keys natively, auto-detects all four address formats (Legacy, SegWit, Native SegWit, Taproot), and bundles portfolio analytics and historical USD valuations — features that competitors either gate behind premium tiers or don’t offer at all.

What Is a Bitcoin xPub (Extended Public Key)?

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:

xpub / ypub / zpub
The key prefixes
xpub derives Legacy (1…) addresses. ypub derives SegWit-wrapped (3…) addresses. zpub derives Native SegWit (bc1q…) addresses. A good API handles all three — plus Taproot (bc1p…).
Why it matters for APIs
One key, full picture
Submit a single extended public key and the API derives every child address, scans balances and transactions across all of them, and returns one aggregated response. No manual address management required.

How to Choose a Bitcoin xPub API

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.

🔑 Key format support
Does it accept xpub, ypub, and zpub? Or only legacy xpub? Incomplete format support means you can’t track modern wallets.
📍 Address format coverage
Legacy (1…), SegWit (3…), Native SegWit (bc1q…), Taproot (bc1p…). The best APIs auto-detect the format from the key prefix.
📊 Data richness
Balance alone isn’t enough. Look for full transaction history, historical USD valuations, and portfolio chart endpoints bundled with xPub queries.
⚡ Performance
xPub queries scan dozens of derived addresses. Some APIs batch this server-side and return fast; others make you feel every address lookup.
💸 Pricing model
Per-request vs. per-derived-address vs. flat subscription. An API that charges per derived address can get expensive fast on active wallets.
🧩 Ecosystem extras
Multi-chain support, exchange connections, DeFi tracking, and AI integrations. Useful if your product expands beyond Bitcoin-only.

The 5 Best Bitcoin xPub APIs in 2026

#1 · BEST OVERALL BITCOIN XPUB API
CoinStats API
Full xpub/ypub/zpub support with portfolio analytics, historical USD valuations, and all four Bitcoin address formats — out of the box.

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:

  • Native xpub, ypub, and zpub support — all three extended key types
  • Auto-detection of Legacy, SegWit, Native SegWit, and Taproot addresses
  • Historical USD valuations on every transaction record
  • Portfolio chart endpoint with configurable time periods
  • On-demand transaction sync — no polling required
  • MCP Server integration for AI-powered wallet analysis
✓ Pros
  • Complete xpub/ypub/zpub support
  • All four address formats auto-detected
  • Historical USD values baked into responses
  • Portfolio charts via API — no client-side math
  • Multi-chain ecosystem beyond Bitcoin
✕ Cons
  • xPub balance costs more credits than single-address calls
  • No self-hosted option
Best suited for
Developers building portfolio trackers, tax calculators, or custody dashboards who need rich wallet data (not just balances) from a single API — especially if the product will expand beyond Bitcoin later.
#2 · BEST FOR SIMPLE BALANCE LOOKUPS
The original Bitcoin block explorer API. Mature xPub endpoint, zero-cost for moderate usage.

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:

  • Established xPub balance and transaction endpoint
  • Free tier with no API key for low-volume use
  • Mature WebSocket support for real-time updates
  • Well-documented with extensive community resources
  • Raw block and transaction data endpoints
✓ Pros
  • Free for low-volume usage
  • Long track record — proven reliability
  • WebSocket support for real-time feeds
✕ Cons
  • No historical USD valuations
  • No portfolio chart endpoints
  • Limited ypub/zpub auto-detection
  • Bitcoin-only — no multi-chain
Best suited for
Developers who need basic xPub balance and transaction lookups for a Bitcoin-only project, and are comfortable computing fiat values and building charts themselves.
#3 · BEST FOR ANALYTICS & PRIVACY
Deep blockchain analytics with xPub support and a privacy-first philosophy.

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:

  • xPub endpoint with UTXO-level detail
  • Privacy-conscious — no account required for free tier
  • Multi-UTXO-chain support (BTC, BCH, LTC, DOGE)
  • SQL-like query filters on transaction data
  • Rich metadata: address type breakdowns, UTXO counts
✓ Pros
  • Deep UTXO-level analytics
  • Privacy-first approach
  • Covers multiple UTXO chains
✕ Cons
  • Expensive at scale — enterprise pricing
  • No portfolio charts or fiat valuations
  • Rate limits tight on free tier
  • No EVM chain support
Best suited for
Teams building privacy-focused Bitcoin tools or analytics platforms that need UTXO-level granularity and don’t mind handling fiat conversions separately.
#4 · BEST FOR DEVELOPER EXPERIENCE
Clean REST API with solid docs and an HD wallet abstraction built in.

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:

  • HD Wallet abstraction — persistent server-side wallet state
  • Confidence factors on unconfirmed transactions
  • Excellent documentation with multi-language examples
  • WebHook support for transaction notifications
  • Transaction building and signing helpers
✓ Pros
  • Great docs and SDK support
  • Unique unconfirmed-tx confidence scores
  • Persistent wallet objects reduce repeat work
✕ Cons
  • Weak ypub/zpub support
  • Extra setup step to create wallet objects
  • 200 req/hour free limit — tight for production
  • No fiat valuations or portfolio analytics
Best suited for
Developers who prioritize clean API design and thorough documentation, primarily work with legacy Bitcoin addresses, and need payment confirmation features.
#5 · BEST FOR SELF-HOSTING
Open-source Bitcoin explorer with a clean REST API. Run the whole stack on your own infrastructure.

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:

  • Fully open-source — MIT licensed
  • Self-hostable with Docker Compose
  • Clean REST API for addresses and transactions
  • Real-time mempool and fee estimation data
  • WebSocket support for block and transaction events
✓ Pros
  • Fully open-source and self-hostable
  • No vendor lock-in
  • Excellent fee estimation and mempool data
✕ Cons
  • No native xPub endpoint — derive addresses yourself
  • Strict rate limits on hosted API
  • Self-hosting requires significant infra
  • Bitcoin-only — no multi-chain
Best suited for
Teams that need full data sovereignty and are willing to self-host a Bitcoin indexer. Best for Bitcoin-maximalist projects where third-party API dependencies are unacceptable.

Comparing the Top 5 Bitcoin xPub APIs

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

Which One Should You Pick?

Portfolio tracker or tax tool
Pick CoinStats API. Historical USD valuations and portfolio charts are built in — you skip weeks of price-history integration work.
Quick prototype or MVP
Pick Blockchain.com. Zero setup, no API key for basic use, and enough data to validate your idea before committing to a paid provider.
Privacy-first analytics
Pick Blockchair. No account required, UTXO-level detail, and no IP-to-xPub logging on the free tier.
Payment verification
Pick BlockCypher. Unconfirmed transaction confidence scores are unique and purpose-built for payment flows.
Full data sovereignty
Pick Mempool.space. Self-host the entire stack. No API keys, no rate limits, no third-party dependencies.
Multi-chain expansion
Pick CoinStats API. Start with Bitcoin xPub, then add Ethereum, Solana, and 50+ other chains through the same API — no provider-switching later.

Beyond xPub: What Else CoinStats API Offers

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.

Conclusion

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.

Start Tracking Bitcoin Wallets by xPub
Full xpub/ypub/zpub support, all address formats, historical USD valuations, and portfolio charts. Free tier available — no credit card required.
Explore the Bitcoin Wallet API →
  • Narek Gevorgyan

    Narek Gevorgyan is the founder and CEO of CoinStats, the trusted crypto portfolio manager of 1 million worldwide.
    An early adopter of crypto, Narek initially created CoinStats to keep track of his holdings without endless Excel sheets. Since then, under Narek's supervision, CoinStats has flourished into a fully fledged crypto, DeFi, and NFT portfolio manager.

Leave a reply

Your email address will not be published. Required fields are marked *

You may also like