Satoshi API — developer-friendly Bitcoin REST API powered by your own node
Project description
Satoshi API
REST API for your Bitcoin node. One pip install, 42 endpoints.
Wraps Bitcoin Core's JSON-RPC in a clean REST interface with analyzed data, smart caching, and tiered rate limiting.
Install & Run
pip install satoshi-api
export BITCOIN_RPC_USER=your_user BITCOIN_RPC_PASSWORD=your_password
satoshi-api
# API: http://localhost:9332
# Docs: http://localhost:9332/docs
Example
curl http://localhost:9332/api/v1/fees/recommended | jq
{
"data": {
"recommendation": "Fees are low. Good time to send.",
"estimates": { "high": 4, "medium": 2, "low": 1 }
},
"meta": { "timestamp": "...", "node_height": 939462, "chain": "main" }
}
Core Endpoints
| Category | Endpoints | Highlights |
|---|---|---|
| Blocks | 8 | Latest block, by height/hash, stats, txids, header |
| Transactions | 7 | Decoded analysis, status, outspends, UTXO lookup, broadcast |
| Fees | 7 | Recommendations, landscape ("send now or wait?"), history, mempool-blocks |
| Mempool | 5 | Congestion score, fee buckets, recent entries |
| Mining | 2 | Hashrate, difficulty, next block template |
| Network | 4 | Peers, forks, difficulty, address validation |
| Streams | 2 | Real-time blocks & fees via SSE |
...and more (prices, address lookups, exchange comparison). Full interactive docs at /docs.
AI Agent Integration (MCP)
Pairs with bitcoin-mcp to give AI assistants direct access to your Bitcoin node via Model Context Protocol.
{
"mcpServers": {
"bitcoin": {
"command": "bitcoin-mcp",
"args": ["--api-url", "http://localhost:9332"]
}
}
}
Self-Hosting
pip install satoshi-api
satoshi-api # runs on :9332
# Expose publicly (free HTTPS + DDoS protection)
cloudflared tunnel --url http://localhost:9332
See self-hosting guide for full production setup.
Contributing
Issues and PRs welcome. Run the test suite before submitting:
pip install -e ".[dev]"
pytest
License
Apache 2.0 — see LICENSE.
Live API · Website · PyPI · MCP Server
Built by a Bitcoin Core contributor.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file satoshi_api-0.3.1.tar.gz.
File metadata
- Download URL: satoshi_api-0.3.1.tar.gz
- Upload date:
- Size: 227.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb57f02121754cd54b868131d060c30117e6e9a8c112821c8dc53bc1b6589016
|
|
| MD5 |
33eaf9b09b7093497c4b86af69324049
|
|
| BLAKE2b-256 |
90950aca4a6e683a2a8e38aa9130d7dd99a0d04064fb6076f2c1776831314700
|
Provenance
The following attestation bundles were made for satoshi_api-0.3.1.tar.gz:
Publisher:
publish.yml on Bortlesboat/bitcoin-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
satoshi_api-0.3.1.tar.gz -
Subject digest:
cb57f02121754cd54b868131d060c30117e6e9a8c112821c8dc53bc1b6589016 - Sigstore transparency entry: 1057459932
- Sigstore integration time:
-
Permalink:
Bortlesboat/bitcoin-api@36c02438fa2a5f7094cb2b28a98bc8901b3ee192 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/Bortlesboat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36c02438fa2a5f7094cb2b28a98bc8901b3ee192 -
Trigger Event:
release
-
Statement type:
File details
Details for the file satoshi_api-0.3.1-py3-none-any.whl.
File metadata
- Download URL: satoshi_api-0.3.1-py3-none-any.whl
- Upload date:
- Size: 46.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d370eccef35064aec4a75cb5623b02852d3263c4dd46cab0f7bf0ad2c5b6ef79
|
|
| MD5 |
71bce2572749431a89f03f30d248fb48
|
|
| BLAKE2b-256 |
af81ea3b6aa9f919f4aa27841fc8063d04f84417a2b69213fe6c05ddb5d3e9dd
|
Provenance
The following attestation bundles were made for satoshi_api-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on Bortlesboat/bitcoin-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
satoshi_api-0.3.1-py3-none-any.whl -
Subject digest:
d370eccef35064aec4a75cb5623b02852d3263c4dd46cab0f7bf0ad2c5b6ef79 - Sigstore transparency entry: 1057459944
- Sigstore integration time:
-
Permalink:
Bortlesboat/bitcoin-api@36c02438fa2a5f7094cb2b28a98bc8901b3ee192 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/Bortlesboat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@36c02438fa2a5f7094cb2b28a98bc8901b3ee192 -
Trigger Event:
release
-
Statement type: