Probably best free Bitcoin wallet API with xpub/ypub/zpub support. Track balances, transactions, derived addresses, and portfolio performance. Bitcoin wallet tracking is harder than other chains because of how HD (hierarchical deterministic) wallets work. A single user might have hundreds of derived addresses under one master key, and querying them individually is impractical. Most wallet apps, hardware wallets, and exchanges use HD wallets, which means a Bitcoin address lookup tool that only supports individual addresses is missing most of the picture. CoinStats Bitcoin API solves this by accepting extended public keys (xpub, ypub, zpub), so you can track all addresses in an HD wallet through a single API call. The API also supports single-address tracking for simpler use cases, and returns full transaction history with timestamps and USD values at the time of each transaction. The same Bitcoin wallet data is available through CoinStats MCP Server for AI agents and LLM-powered tools, so AI assistants can query Bitcoin wallets directly.Documentation Index
Fetch the complete documentation index at: https://coinstats.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
What You Get
xpub/ypub/zpub Support
Track all derived addresses from an HD wallet with a single extended public key.
Single Address Tracking
Query any individual Bitcoin address for balance and transaction history.
Full Transaction History
Every transaction with timestamps, amounts, and USD values at time of transaction.
UTXO Data
Unspent transaction output information for advanced wallet analysis.
Multi-Format Addresses
Legacy (1…), SegWit (3…), Native SegWit (bc1…), and Taproot (bc1p…) all supported.
Portfolio Performance
Historical portfolio value charts for tracking Bitcoin holdings over time.
Why xpub Support Matters
When a user sets up a Bitcoin wallet (whether it’s a Ledger, Trezor, Exodus, or any BIP-39 compatible wallet), the wallet software generates a master key. Every time the user receives a payment, the wallet creates a new address derived from that master key. After a few months of use, a single wallet might have 50, 100, or even 500 derived addresses. Without xpub support, a portfolio tracker or tax tool would need the user to manually list every address they’ve ever used. This is impractical and error-prone. With xpub support, you pass the extended public key once, and the API discovers all derived addresses automatically. This is how most production Bitcoin wallet integrations work. The CoinStats API accepts xpub, ypub (SegWit-wrapped), and zpub (Native SegWit) keys. All three work the same way: pass the key, get balances and transactions across all derived addresses.Extended Public Key (xpub) Tracking
xpub vs Single Address
| Feature | xpub Tracking | Single Address |
|---|---|---|
| Coverage | All derived addresses | One address only |
| UTXO tracking | Complete | Per address |
| Credit cost | 4,000 credits | 40 credits |
| Use case | Wallet apps, tax tools | Block explorers, monitoring |
Single Address Tracking
For simpler use cases where you only need one address:Example Bitcoin Balance Response
Transaction History
Retrieve complete transaction history for a Bitcoin address or xpub:/wallet/transactions.
Each transaction record includes the timestamp, BTC amount, transaction hash, and the USD value at the time of the transaction. This is particularly important for tax tools, which need the fair market value at the time of each transaction for cost-basis calculations. The API also distinguishes between received and sent transactions, which simplifies gain/loss computation.
Portfolio Performance
Get historical portfolio value over time:Credit Costs at a Glance
| Endpoint | Credits | Description |
|---|---|---|
| Single address balance | 40 | BTC balance for one address |
| xpub balance | 4,000 | Total BTC across all derived addresses |
| Transaction history | 30 | Paginated transaction list |
| Transaction sync | 50 | Index latest transactions |
| Portfolio chart | 40 | Historical portfolio value |
What You Can Build With Bitcoin Wallet Data
Tax and Accounting Tools
Bitcoin tax reporting is complex because HD wallets generate new addresses for each transaction. Without xpub support, a tax tool would need users to manually identify and submit every address they’ve ever used. Some users don’t even know which addresses their wallet has generated, making manual submission unreliable. The CoinStats API handles this automatically: pass the xpub key, and the API returns transactions across all derived addresses with USD values at the time of each transaction. This gives you the raw data for FIFO, LIFO, or specific identification cost-basis methods. Each transaction includes the timestamp, BTC amount, and historical USD price, which is everything a tax engine needs. For users who have held Bitcoin across multiple wallets over time, your application can accept multiple xpub keys and aggregate the transaction history across all of them. The response format is consistent regardless of whether you query one xpub or one address, so the same parsing code handles both.Bitcoin Portfolio Trackers
For portfolio apps, the balance endpoint returns current holdings with real-time USD valuation, and the chart endpoint provides historical performance data. Combined with transaction history, you can show users their total BTC holdings, unrealized gains/losses, average cost basis, and portfolio performance over any time period. A typical flow: user enters their xpub key (which they can export from their wallet software), your app calls the balance endpoint to get the current total, calls the chart endpoint for a performance graph, and calls the transaction endpoint for a full activity log. Three API calls give you a complete Bitcoin portfolio view.Custody and Cold Storage Monitoring
Institutional users and custody solutions need to monitor Bitcoin held across multiple addresses and cold storage wallets. The xpub endpoint tracks all addresses under a master key, while single-address tracking works for known deposit or cold storage addresses. Both return the same response format, making it easy to aggregate across wallet types. For organizations that use multi-signature wallets, the API can track each cosigner’s xpub independently, giving a combined view of the multisig holdings. The UTXO data in the response is useful for custody solutions that need to verify the unspent outputs backing the wallet’s balance.Bitcoin Payment Verification
If you’re building a payment processing system or a merchant tool that accepts Bitcoin, the single-address endpoint can verify that a payment has arrived at a specific address. Sync the address first, then query the transaction history to see if the expected payment has been confirmed. The response includes confirmation status and timestamps.AI-Powered Bitcoin Analysis
Through CoinStats MCP Server, AI agents can check Bitcoin wallet balances, look up transaction history, and analyze portfolio performance using natural language. An AI assistant can answer questions like “What’s the balance of this xpub?” or “Show me the transaction history for this Bitcoin address.” This is useful for building research tools, chatbots, or copilot features that need Bitcoin wallet data.Bitcoin vs. Other Chains
The CoinStats API uses the same endpoint format across all supported chains. If your application needs wallet data beyond Bitcoin, you can query Solana, Ethereum, EVM chains, and 120+ other networks by changing theconnectionId parameter. See Solana Wallet API, Ethereum & EVM Chains page, or Multi-Chain Support page.
Address Format Support
The API accepts all standard Bitcoin address formats. The address type is detected automatically.| Format | Prefix | Example |
|---|---|---|
| Legacy | 1... | 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa |
| SegWit (P2SH) | 3... | 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy |
| Native SegWit (Bech32) | bc1q... | bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh |
| Taproot (Bech32m) | bc1p... | bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297 |
| xpub | xpub... | Extended public key for HD wallets |
| ypub | ypub... | SegWit-wrapped extended public key |
| zpub | zpub... | Native SegWit extended public key |
Getting Started
- Sign up at CoinStats API dashboard and generate an API key
- Try the single-address balance endpoint with the cURL example above
- For HD wallet tracking, export your xpub from your wallet software and use the xpub endpoint
- Explore the full endpoint reference in API docs
Common Bitcoin Addresses
For testing and development:| Type | Address | Description |
|---|---|---|
| Genesis Block | 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa | Satoshi’s genesis address |
| SegWit Example | bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh | Native SegWit address |