Official FX rates — all eight pairs
All eight official reference rates vs USD in one payload, via Frankfurter (frankfurter.dev). Same blend and the same as_of / source fields as the single-pair shelf.
$0.02 per call — paid in USDC on Base over the x402 protocol, settled by Coinbase. No API key, no signup.
Call it (any x402 client)
# 1. GET without payment → HTTP 402 with PAYMENT-REQUIRED (price, payTo, scheme "exact")
curl -i "http://nibiashara-shelves-626103352898.us-central1.run.app/shelf/fx-official-all"
# 2. Sign the payment (EIP-3009 transferWithAuthorization, gasless) and retry
# with the PAYMENT-SIGNATURE header → response body is the delivery.
With the official JS client the whole flow is one wrapped fetch:
import { wrapFetchWithPayment } from "@x402/fetch"; // npm i @x402/fetch @x402/evm
const fetchPaid = wrapFetchWithPayment(fetch, { /* your EVM signer */ });
const res = await fetchPaid("http://nibiashara-shelves-626103352898.us-central1.run.app/shelf/fx-official-all");
const data = await res.json();
Or install the MCP server (http://nibiashara-shelves-626103352898.us-central1.run.app/mcp, registry id biz.nibiashara/shelves) and use the job-named tool for this shelf, or buy_shelf as an escape hatch.
Calling this repeatedly? Buy a Shelf Pass once ($0.99 for 110 credits) and send
X-SHELF-PASS: <token> instead of paying per call — this shelf costs 2 credits per call.Example response (illustrative shape, not a live rate)
{
"illustrative": true,
"note": "Illustrative shape only. Not a live rate and not dated. Call GET /fx/sample/<sku> for a free preview, or pay the shelf for the current quote.",
"base": "USD",
"count": 8,
"rates": [
{
"pair": "USD-KES",
"rate": 129.2,
"as_of": null,
"source": "frankfurter.dev",
"source_name": "Frankfurter"
}
]
}
Free preview, no payment: /fx/sample/fx-official-all. Where the number comes from: /fx/methodology.
Delivers
JSON { base, count, rates[] }