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, 42 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.

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.


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.1.tar.gz (227.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.1-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

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

Hashes for satoshi_api-0.3.1.tar.gz
Algorithm Hash digest
SHA256 cb57f02121754cd54b868131d060c30117e6e9a8c112821c8dc53bc1b6589016
MD5 33eaf9b09b7093497c4b86af69324049
BLAKE2b-256 90950aca4a6e683a2a8e38aa9130d7dd99a0d04064fb6076f2c1776831314700

See more details on using hashes here.

Provenance

The following attestation bundles were made for satoshi_api-0.3.1.tar.gz:

Publisher: publish.yml on Bortlesboat/bitcoin-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for satoshi_api-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d370eccef35064aec4a75cb5623b02852d3263c4dd46cab0f7bf0ad2c5b6ef79
MD5 71bce2572749431a89f03f30d248fb48
BLAKE2b-256 af81ea3b6aa9f919f4aa27841fc8063d04f84417a2b69213fe6c05ddb5d3e9dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for satoshi_api-0.3.1-py3-none-any.whl:

Publisher: publish.yml on Bortlesboat/bitcoin-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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