Skip to content

[Grant Proposal] Bitcoin Data API with x402 Micropayments — Satoshi API #1736

@Bortlesboat

Description

@Bortlesboat

What it does

Satoshi API is an open-source Bitcoin data API (120+ endpoints) now integrated with x402 for pay-per-call access to premium features. Anonymous users can pay with USDC on Base — no API key, no signup, no subscription.

Live now: curl https://bitcoinsapi.com/api/v1/ai/explain-tx/test123 returns a 402 with standard x402 payment requirements.

Why it matters for x402

  • First Bitcoin-native data provider using x402 — blockchain data paid for with crypto
  • Unlocks new supply: 3 premium endpoints live today, architecture supports gating any of the 120+ endpoints
  • MCP server included — AI agents (Claude, GPT) can query Bitcoin data and pay via x402 automatically
  • Proves the chain-agnostic vision: x402 paying for Bitcoin infrastructure, not just DeFi/EVM apps

What's live

Endpoint Price What it does
/api/v1/ai/* $0.01 AI-powered transaction analysis, fee advice
/api/v1/broadcast $0.01 Broadcast signed transactions
/api/v1/mining/nextblock $0.01 Next block fee prediction

All other endpoints (fees, blocks, mempool, mining, network, etc.) are free — we want users first, then upsell premium.

Tech stack

  • Python x402 middleware (bitcoin-api-x402) wrapping the official x402 SDK
  • FastAPI + Bitcoin Core RPC backend
  • MCP server for AI agent access at /mcp
  • Toggleable via ENABLE_X402=true/false env var

What grant funds would cover

  1. Base Sepolia testnet integration — let developers test x402 flows without spending real USDC
  2. x402 payment dashboard — track payments, revenue, usage per endpoint
  3. Lightning bridge exploration — working toward Bitcoin-native payments alongside USDC (aligned with the Lightning scheme spec discussions in PR feat: add spec exact scheme on btc Lightning Network #1311)

Demo

Production endpoint returning a spec-compliant 402:

curl -s https://bitcoinsapi.com/api/v1/ai/explain-tx/test123 | jq .paymentRequirements

Links

Grant request: $3,000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions