Skip to main content

L402 API Catalog › Bitcoin & Lightning Data

Price Oracle L402 API

BTC price from CoinGecko + Coinbase in USD, EUR, GBP, JPY.

200 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_price_oracle 200 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_price_oracle"}'

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": "price_oracle",
    "timestamp": "2026-09-11T15:04:05+00:00",
    "paid_sats": 200,
    "btc_usd": 104812.37,
    "btc_eur": 96204.55,
    "btc_gbp": 81337.9,
    "btc_jpy": 15982340,
    "sources": [
        "coingecko",
        "coinbase"
    ],
    "sats_per_dollar": 954
}

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/price_oracle"

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 Price Oracle API cost?
Each call costs 200 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 Price Oracle return?
A JSON object carrying btc_usd, btc_eur, btc_gbp, btc_jpy, sources and sats_per_dollar. See the example response above for the exact shape.

Related endpoints

Lightning Stats 200 sats LNURL Metadata 30 sats Invoice Decode 30 sats Node Info 30 sats Fee Estimate 50 sats Ask a Human 500 sats

All Bitcoin & Lightning Data endpoints · How L402 authentication works · List your own API on the gateway