ShelvesNi Biashara Shelvespay-per-call APIs for AI agents · x402 · USDC on Base
data · instant

Official FX rate — one African pair

Official forex reference rate vs USD for one African currency: KES (Kenyan shilling), NGN (naira), GHS (cedi), TZS, UGX, ZAR, EGP, RWF, via Frankfurter (frankfurter.dev). Frankfurter blends published central-bank reference rates; the number is that blend, not a single central-bank fixing. Each response names the source and carries as_of (Frankfurter's rate date) and fetched_at.

$0.01 per call — paid in USDC on Base over the x402 protocol, settled by Coinbase. No API key, no signup.

Parameters

paramdescription
paire.g. USD-KES (required)

Call it (any x402 client)

# 1. GET without payment → HTTP 402 with PAYMENT-REQUIRED (price, payTo, scheme "exact")
curl -i "https://agents.nibiashara.biz/shelf/fx-official?pair=USD-KES"

# 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("https://agents.nibiashara.biz/shelf/fx-official?pair=USD-KES");
const data = await res.json();

Or install the MCP server (https://agents.nibiashara.biz/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 1 credit 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.",
  "pair": "USD-KES",
  "base": "USD",
  "quote": "KES",
  "rate": 129.2,
  "as_of": null,
  "fetched_at": null,
  "source": "frankfurter.dev",
  "source_name": "Frankfurter",
  "source_url": "https://www.frankfurter.dev/",
  "rate_kind": "frankfurter_blended_reference",
  "label": "Official reference rate via Frankfurter. A blend of published reference rates, not a single central-bank fixing.",
  "providers": [],
  "parallel_rate": null
}

Free preview, no payment: /fx/sample/fx-official. Where the number comes from: /fx/methodology.

Delivers

JSON { pair, rate, as_of, source }

← all shelves