One pip install. Analyzed data, not raw RPC dumps. Open source, self-hosted, zero vendor lock-in.
$ pip install satoshi-api
$ satoshi-api
INFO Satoshi API running at http://localhost:9332
INFO Interactive docs at http://localhost:9332/docs
$ curl https://bitcoinsapi.com/api/v1/fees/recommended | jq .data
Loading live fee data...
A thin REST layer between your Bitcoin Core node and your applications.
Bitcoin Core's JSON-RPC is powerful but awkward. Raw responses, no caching, no rate limiting, no input validation.
Satoshi API wraps it in a clean REST interface with typed responses, smart caching, and analyzed data.
Instead of calling estimatesmartfee five times and doing math, you get a single endpoint with human-readable recommendations in sat/vB.
It's part of a three-layer stack for Bitcoin developers:
Everything Bitcoin Core is missing as an API server.
Fee recommendations in sat/vB. Mempool congestion scores. Block weight utilization percentages. Not raw hex and BTC/kVB.
Reorg-aware TTL caching. Deep blocks cached 1 hour. Tip blocks cached 30 seconds. Fees refresh every 10 seconds. Zero stale data risk.
Four tiers with sliding-window per-minute and daily limits. Expose your API safely without worrying about abuse.
Optional API keys via X-API-Key header. SHA256 hashed storage. Tiered access control. Anonymous read access for public use.
Txids validated as 64-hex before hitting RPC. Block heights checked for bounds. RPC errors mapped to proper HTTP status codes (404, 400, 502).
Every response: { data, meta }. Every error: { error: { status, title, detail } }. Request IDs on everything. No guessing.
Pair with bitcoin-mcp to give Claude or GPT direct access to your node via MCP tool calls.
Optional L402 support for Bitcoin-native API access. Clients pay per-request via Lightning — no accounts, no API keys. Available as an extension.
Your node, your data, your API. No third party sees your queries. No vendor lock-in. No surprise pricing changes. MIT licensed.
110 tests (89 unit + 21 e2e). Docker support. Cloudflare Tunnel deployment. Structured access logging. Graceful shutdown. Tested under load.
Anyone who runs a Bitcoin node and wants to build on top of it.
You run a node already. You want to check fees, monitor the mempool, or build a dashboard. pip install, point at your node, done.
curl localhost:9332/api/v1/mempool
# Congestion level, fee buckets,
# next-block minimum fee
Building a wallet, payment processor, or Bitcoin app? Get fee estimates, broadcast transactions, look up UTXOs. All validated and typed.
curl -X POST localhost:9332/api/v1/broadcast \
-H "X-API-Key: sk_..." \
-d '{"hex": "0200000001..."}'
# Returns txid on success
Give your AI assistant real-time Bitcoin data. "What are current fees?" "Analyze the latest block." Your node answers directly via MCP.
# claude desktop config
"bitcoin": {
"command": "bitcoin-mcp",
"args": ["--api-url",
"http://localhost:9332"]
}
Pull block stats, mining data, and fee trends into your analytics pipeline. JSON responses, consistent format, easy to ingest.
curl localhost:9332/api/v1/mining
# Difficulty, hashrate, next
# retarget height, blocks until
Third-party APIs correlate your address lookups with your IP. Self-hosted = zero data leakage. Query your own node, keep your privacy.
Teaching Bitcoin internals? The interactive docs at /docs let students explore blocks, transactions, and the mempool with live data.
Blocks, transactions, fees, mempool, mining, network, prices, streams.
| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Node reachability check |
| GET | /status | Full node status (sync, peers, disk) |
| GET | /blocks/latest | Latest block analysis |
| GET | /blocks/tip/height | Current chain height |
| GET | /blocks/tip/hash | Current tip block hash |
| GET | /blocks/{height_or_hash} | Block by height or hash |
| GET | /blocks/{height}/stats | Detailed block statistics |
| GET | /blocks/{hash}/txids | Transaction IDs in a block |
| GET | /blocks/{hash}/txs | Full transactions in a block |
| GET | /blocks/{hash}/header | Raw block header |
| GET | /tx/{txid} | Transaction analysis (fees, SegWit, Taproot) |
| GET | /tx/{txid}/raw | Raw decoded transaction |
| GET | /tx/{txid}/hex | Transaction as hex string |
| GET | /tx/{txid}/status | Confirmation status |
| GET | /tx/{txid}/outspends | Spending status of each output |
| GET | /utxo/{txid}/{vout} | UTXO lookup (spent/unspent) |
| POST | /decode | Decode raw transaction hex |
| POST | /broadcast | Broadcast signed transaction |
| GET | /fees | Fee estimates (all targets) |
| GET | /fees/recommended | Human-readable fee recommendation |
| GET | /fees/{target} | Fee for specific confirmation target |
| GET | /fees/landscape | Should I send now or wait? Decision engine |
| GET | /fees/estimate-tx | Transaction size & fee cost estimator |
| GET | /fees/history | Historical fee rates & cheapest hour |
| GET | /fees/mempool-blocks | Fee distribution by projected blocks |
| GET | /mempool | Mempool analysis (congestion, fee buckets) |
| GET | /mempool/info | Raw mempool info |
| GET | /mempool/tx/{txid} | Single mempool entry |
| GET | /mempool/txids | All mempool transaction IDs |
| GET | /mempool/recent | Recently added mempool entries |
| GET | /mining | Mining stats (difficulty, hashrate, retarget) |
| GET | /mining/nextblock | Next block template analysis |
| GET | /network | Network info (connections, relay fee) |
| GET | /network/forks | Chain tips and fork detection |
| GET | /network/difficulty | Current difficulty and retarget info |
| GET | /network/validate-address/{addr} | Validate a Bitcoin address |
| GET | /prices | BTC price in 6 fiat currencies |
| GET | /stream/blocks | Real-time new block events (SSE) |
| GET | /stream/fees | Live fee rate updates every 30s (SSE) |
| GET | /address/{address} | Address balance and UTXO summary |
| GET | /address/{address}/utxos | List unspent outputs for an address |
| POST | /register | Self-serve API key registration |
| GET | /tools/exchange-compare | Compare exchange prices & fees |
All endpoints prefixed with /api/v1. Interactive docs at /docs (Swagger UI) and /redoc.
New: Fee landscape ("should I send now?"), tx cost estimator, historical fees, SSE real-time streams. Roadmap: Address lookups, Prometheus metrics, webhook notifications. Follow progress on GitHub.
Start querying Bitcoin data in seconds.
No node, no install, no signup. Just start making requests:
# Get current fee recommendations
curl https://bitcoinsapi.com/api/v1/fees/recommended
# Latest block analysis
curl https://bitcoinsapi.com/api/v1/blocks/latest
# Mempool congestion
curl https://bitcoinsapi.com/api/v1/mempool
# Mining stats
curl https://bitcoinsapi.com/api/v1/mining
That's it. No API key needed for GET requests. Try all 43 endpoints in the interactive playground.
Unlock 10,000 requests/day and POST access. Takes 5 seconds:
Run the full API on your own Bitcoin Core node. Unlimited requests, full privacy.
# Install
pip install satoshi-api
# Configure (point at your node)
export BITCOIN_RPC_USER=your_user
export BITCOIN_RPC_PASSWORD=your_password
# Run
satoshi-api
# API at http://localhost:9332
# Docs at http://localhost:9332/docs
Also available via Docker: docker compose up -d. Requires Bitcoin Core with server=1 and Python 3.10+. txindex=1 recommended.
Self-host for free, or use our hosted API at bitcoinsapi.com.
Need higher limits or a dedicated instance? Get in touch.
You have options. Here's why Satoshi API exists.
| Feature | Satoshi API | Raw RPC | Hosted APIs |
|---|---|---|---|
| Setup time | 3 lines | Already there | Sign up + API key |
| Self-hosted | Yes | Yes | No |
| Privacy | Your node, your data | Your node | They see your queries |
| Analyzed data | Fee recs, congestion, analysis | Raw values only | Varies |
| Caching | Reorg-aware TTL | None | Varies |
| Rate limiting | Built-in, tiered | None | Yes (their limits) |
| Input validation | Before RPC call | None | Yes |
| Cost at scale | $0 (self-host) | $0 | $50-500+/mo |
| AI agent support | MCP ready | No | No |
| Vendor lock-in | None (MIT) | None | Yes |
No signup, no install. Just curl and go.