Skip to main content

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, 73 endpoints.

CI PyPI Downloads Python 3.10+ License Live API

Live Playground · Landing Page · PyPI · MCP Server


Wraps Bitcoin Core's JSON-RPC in a clean REST interface with analyzed data, smart caching, and tiered rate limiting. Optional integrations: email notifications (Resend), persistent rate limiting (Upstash Redis), and privacy-first analytics (PostHog) -- all disabled by default.

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.

For AI Agents

bitcoin-mcp — the first Bitcoin MCP server on the official Anthropic MCP Registry — gives AI assistants direct access to your Bitcoin node via Model Context Protocol. 35 tools, 6 prompts, 7 resources.

# Install and point at your Satoshi API instance
pip install bitcoin-mcp
SATOSHI_API_URL=https://bitcoinsapi.com bitcoin-mcp

Or connect to a local node directly:

{
  "mcpServers": {
    "bitcoin": { "command": "bitcoin-mcp" }
  }
}

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.


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

satoshi_api-0.3.2.tar.gz (365.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

satoshi_api-0.3.2-py3-none-any.whl (109.2 kB view details)

Uploaded Python 3

File details

Details for the file satoshi_api-0.3.2.tar.gz.

File metadata

  • Download URL: satoshi_api-0.3.2.tar.gz
  • Upload date:
  • Size: 365.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for satoshi_api-0.3.2.tar.gz
Algorithm Hash digest
SHA256 ff6a0ce5a47ea82e030d7aece64d9371616bbfb3f43567a2a3242002ce96fd91
MD5 90548fa36c189b70e73d52e3dff23c30
BLAKE2b-256 112bdd9f96049254727b1d85a2428ea79ca2135d2845f4e101ea789e97532e51

See more details on using hashes here.

File details

Details for the file satoshi_api-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: satoshi_api-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 109.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for satoshi_api-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9834cd862257e33531be3db7163fbea5fefbc761e45c77a5d2c1cc1df1409019
MD5 c6fcded93a569d5350536cd64f24793d
BLAKE2b-256 54f3f3534a861f07c24f7b095fd0efaf211030530976b1fad4e4e7f121ec207d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page