Fee Endpoints

Seven endpoints covering every fee estimation use case — from simple recommendations to historical analysis and mempool projections.

GET /api/v1/fees

Returns fee estimates for all standard confirmation targets (1, 3, 6, 12, 24, 48, 144, 504, 1008 blocks). Each estimate includes the fee rate in sat/vB and the target block count. Use this when you need the full fee curve at a glance.

{ "data": { "estimates": [ { "blocks": 1, "fee_rate": 14.5, "fee_rate_btc_kvb": 0.00014500 }, { "blocks": 6, "fee_rate": 8.2, "fee_rate_btc_kvb": 0.00008200 }, { "blocks": 144, "fee_rate": 3.1, "fee_rate_btc_kvb": 0.00003100 } ] } }
GET /api/v1/fees/recommended

Human-readable fee recommendations with three priority tiers: high (next block), medium (within 6 blocks), and low (within 24 blocks). Returns the sat/vB rate for each tier along with a plain-language recommendation. Ideal for wallet UIs and payment flows.

{ "data": { "recommendation": "Fees are moderate. Medium priority recommended.", "estimates": { "high": { "sat_per_vb": 14.5, "blocks": 1 }, "medium": { "sat_per_vb": 8.2, "blocks": 6 }, "low": { "sat_per_vb": 3.1, "blocks": 24 } }, "fee_landscape": { "spread": 11.4, "urgency_premium": "76.8%" } } }
GET /api/v1/fees/{target}

Fee estimate for a specific confirmation target. Pass any block count (e.g., /fees/2 for 2-block confirmation). Returns the sat/vB rate and the exact target used by Bitcoin Core's estimatesmartfee RPC.

{ "data": { "target_blocks": 2, "fee_rate": 12.8, "fee_rate_btc_kvb": 0.00012800 } }
GET /api/v1/fees/landscape

The "should I send now or wait?" decision engine. Analyzes the current fee environment and returns a send/wait recommendation based on fee spread, urgency premium, and mempool conditions. Includes a congestion level indicator and the optimal fee tier for cost-conscious transactions.

{ "data": { "recommendation": "Fees are low. Good time to send.", "congestion": "low", "spread": 5.2, "urgency_premium_pct": 42.1, "optimal_tier": "medium" } }
GET /api/v1/fees/estimate-tx

Transaction size and cost estimator. Pass the number of inputs and outputs to get the estimated virtual size and total fee at current rates for each priority tier. Essential for wallets that need to display fee previews before signing.

{ "data": { "inputs": 2, "outputs": 2, "estimated_vsize": 226, "fee_estimates": { "high": { "sat_per_vb": 14.5, "total_sats": 3277 }, "medium": { "sat_per_vb": 8.2, "total_sats": 1853 }, "low": { "sat_per_vb": 3.1, "total_sats": 701 } } } }
GET /api/v1/fees/history

Historical fee rates and the cheapest hour to send. Returns recent fee data aggregated by time period, helping users identify patterns and schedule non-urgent transactions for low-fee windows.

{ "data": { "cheapest_hour_utc": 6, "current_vs_average": "below average", "history": [ { "hour_utc": 6, "avg_sat_per_vb": 2.8 }, { "hour_utc": 15, "avg_sat_per_vb": 18.4 } ] } }
GET /api/v1/fees/mempool-blocks

Fee distribution by projected blocks. Shows how the current mempool would be mined across the next several blocks, with the minimum fee rate required to make it into each block. Useful for visualizing fee pressure and making informed priority decisions.

{ "data": { "projected_blocks": [ { "block": 1, "min_fee": 12.1, "tx_count": 2847, "size_vb": 998200 }, { "block": 2, "min_fee": 8.0, "tx_count": 3102, "size_vb": 997800 }, { "block": 3, "min_fee": 3.5, "tx_count": 1456, "size_vb": 654300 } ] } }

Live Example

Query the fee recommendation endpoint on the live instance. No API key required for GET requests.

# Get recommended fee rates from the live API
curl https://bitcoinsapi.com/api/v1/fees/recommended

Response:

{
  "data": {
    "recommendation": "Fees are moderate. Medium priority recommended.",
    "estimates": {
      "high":   { "sat_per_vb": 14.5, "blocks": 1 },
      "medium": { "sat_per_vb": 8.2,  "blocks": 6 },
      "low":    { "sat_per_vb": 3.1,  "blocks": 24 }
    },
    "fee_landscape": {
      "spread": 11.4,
      "urgency_premium": "76.8%"
    }
  },
  "meta": {
    "timestamp": "2026-03-07T14:22:01Z",
    "cached": true,
    "cache_age_seconds": 4
  }
}

Every response includes a meta block with the timestamp and cache age, so you always know how fresh the data is. Cache refreshes every 10 seconds — stale data risk is minimized.

How It Works

Satoshi API sits on top of your own Bitcoin Core node. When a fee endpoint is called, the API:

  1. Calls estimatesmartfee for multiple confirmation targets (1, 3, 6, 12, 24, 48, 144, 504, 1008 blocks), collecting the raw BTC/kVB estimates from your node.
  2. Converts to sat/vB — the standard unit developers and wallets actually use. No more manual BTC/kVB-to-sat/vB math.
  3. Analyzes the fee landscape — calculates the spread between high and low priority, the urgency premium percentage, and the congestion level based on mempool state.
  4. Returns structured recommendations — plain-language advice alongside the raw numbers, so both humans and machines can consume the data.

Smart caching refreshes data every 10 seconds. This means rapid successive requests are served from cache (sub-millisecond), while the underlying data never goes stale. The cache is reorg-aware — if a block reorganization is detected, cached data is invalidated immediately.

Because the API runs on your own node, there is no third-party dependency. Your fee queries never leave your infrastructure. No rate limits, no API keys required for reads, no vendor lock-in.

Fee API Comparison

How different Bitcoin fee data sources stack up for developers.

Bitcoin Core RPC Mempool.space BlockCypher Satoshi API
Unit returned BTC/kVB (raw) sat/vB satoshis/byte sat/vB
Fee tiers Single target per call fastest / halfHour / hour / economy / minimum high / medium / low High / medium / low + any custom target
Fee endpoints 1 (estimatesmartfee) 2 1 7
Landscape analysis No No No Yes (spread, congestion, send/wait)
TX cost estimator No No No Yes (inputs/outputs to total sats)
Historical fees No Mempool blocks only No Yes (cheapest hour, averages)
Mempool block projection No Yes No Yes
Real-time stream No WebSocket No SSE (every 30s)
Self-hosted Yes Optional No Yes
Privacy Full Public instance sees queries SaaS Full (your node)

Real-Time Fee Stream

For applications that need continuous fee updates without polling, Satoshi API provides a Server-Sent Events (SSE) endpoint:

curl -N https://bitcoinsapi.com/api/v1/stream/fees

This stream pushes updated fee data every 30 seconds. SSE is natively supported by browsers (EventSource API), Python (sseclient), and most HTTP libraries. Unlike WebSockets, SSE works through proxies and load balancers without special configuration.

Use the stream for live fee dashboards, transaction timing bots, or any application where polling introduces unnecessary latency or complexity.

Get Started

Satoshi API is open source and installable via pip. Point it at any Bitcoin Core node and all 7 fee endpoints are live in under a minute.

# Install from PyPI
pip install satoshi-api

# Start the server (reads RPC credentials from environment)
satoshi-api --host 0.0.0.0 --port 9332

Or try the live instance directly — no setup required:

# All fee estimates
curl https://bitcoinsapi.com/api/v1/fees

# Human-readable recommendations
curl https://bitcoinsapi.com/api/v1/fees/recommended

# Should I send now or wait?
curl https://bitcoinsapi.com/api/v1/fees/landscape

# How much will my transaction cost?
curl "https://bitcoinsapi.com/api/v1/fees/estimate-tx?inputs=2&outputs=2"

Full API Documentation

Interactive Swagger docs with all 74 endpoints, request/response schemas, and try-it-live buttons.

bitcoinsapi.com/docs