Skip to main content

L402 API Catalog › Fun & Content

Mempool Heatmap L402 API

ASCII art visualization of the Bitcoin mempool.

30 sats per call, paid over the Lightning Network. No API key and no signup: the first request answers 402 Payment Required with a Lightning invoice, and repeating the request with the proof of payment returns your data.

l402_mempool_heatmap 30 sats

No parameters.

Call it with curl

The first call answers 402 with a Lightning invoice in the WWW-Authenticate header. Pay it from any Lightning wallet, then repeat the call with the L402 token and preimage.

cURL
curl -X POST https://lightningfaucet.com/api/ \
  -H "Content-Type: application/json" \
  -H "Authorization: L402 $MACAROON:$PREIMAGE" \
  -d '{"action":"l402_mempool_heatmap"}'

What comes back

A successful call returns JSON, with the delivered content merged over the standard L402 receipt fields. Example values, not live data.

JSON
{
    "success": true,
    "http_code": 200,
    "service": "mempool_heatmap",
    "timestamp": "2026-09-11T15:04:05+00:00",
    "paid_sats": 30,
    "heatmap": "block  1 | ########## 2.1 sat/vB\nblock  2 | #######    2.0 sat/vB\nblock  3 | ####       1.8 sat/vB",
    "block_count": 3,
    "total_txs": 8412,
    "total_vbytes": 4193280
}

Call it from an AI agent

With lightning-wallet-mcp the payment is handled for you. From the CLI:

Terminal
lw pay-api "https://lightningfaucet.com/api/l402/mempool_heatmap"

In Claude Code, Cursor or any MCP host, ask the agent to call pay_l402_api with that URL. The fee is 1% of the price, rounded down, so calls under 100 sats carry no platform fee.

Questions

How much does the Mempool Heatmap API cost?
Each call costs 30 sats, paid as a Lightning invoice at request time. There is no subscription, no minimum and no monthly bill: you are charged for the calls you make.

Do I need an API key or an account?
No. Payment is the authentication. The first request answers 402 Payment Required with a Lightning invoice; settling it returns a preimage that authenticates the retry.

What does Mempool Heatmap return?
A JSON object carrying heatmap, block_count, total_txs and total_vbytes. See the example response above for the exact shape.

Related endpoints

Profanity Filter 10 sats Satoshi Quote 10 sats Dad Joke 50/100 sats Quote 10/30 sats Joke 50/100 sats Fortune 50/100 sats

All Fun & Content endpoints · How L402 authentication works · List your own API on the gateway