code402 / tools / crypto-ticker
$0.002 per call · 20 free calls/day · no signup · pay with card credits or a signed USDC voucher (x402)
Current spot price (USD) for a symbol via the public CoinGecko API; common tickers (btc, eth, …) are mapped to CoinGecko ids automatically. Cached 60s server-side; preflighted so you never pay during an API outage.
curl -X POST https://code402.dev/v1/tools/crypto-ticker/call \
-H "content-type: application/json" \
-d '{"symbol":"btc"}'
No key needed for the free tier. When the free quota is used up, the API replies HTTP 402 with the exact price — agents sign the x402 voucher and retry; humans buy card credits. Every paid response carries a signed receipt you can verify offline.
| Field | Type | Meaning |
|---|---|---|
symbol (required) | string | Ticker symbol (btc, eth, sol, …) or a CoinGecko asset id (bitcoin, ethereum, …). |
Top-level fields: tool, valid, symbol, coingecko_id, price_usd, currency, cached, fetched_at, reason, retryable, scope. Paid responses also carry a signed XDR-1 receipt.
Machine-readable catalog: llms-full.txt · MCP manifest · OpenAPI. Operated by JUANA LIMITED (UK Co. No. 14043409). Non-custodial: USDC settles payer→seller directly on Base.