X

X402stock · Exchange Rates

by X402stock

GETBase

$0.02

per call · USD Coin on Base

Official US Treasury reporting rates of exchange — government FX reference rates for ~170 currencies, in units of foreign currency per 1 USD, for the latest quarter. Use for accounting-grade and exotic-currency conversion the market /api/v1/forex feed lacks. Filter with `?currency=Euro`. Updated quarterly. From the US Treasury (FiscalData). From x402stock

Endpoint

GET https://x402stock.xyz/api/v1/exchange-rates

1

Calls / 30d

1

Unique payers / 30d

Aug 17

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://x402stock.xyz/api/v1/exchange-rates", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://x402stock.xyz/api/v1/exchange-rates?currency=Euro" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "as_of": "2026-03-31T00:00:00.000Z",
  "count": 168,
  "note": "Official US Treasury reporting rates of exchange — units of foreign currency per 1 USD. Updated quarterly; use for accounting/reference conversion, not live FX (see /api/v1/forex for market rates).",
  "rates": [
    {
      "country": "Euro Zone",
      "country_currency": "Euro Zone-Euro",
      "currency": "Euro",
      "effective_date": "2026-03-31",
      "exchange_rate": 0.924
    },
    {
      "country": "Japan",
      "country_currency": "Japan-Yen",
      "currency": "Yen",
      "effective_date": "2026-03-31",
      "exchange_rate": 149.32
    }
  ],
  "record_date": "2026-03-31",
  "series": "rates_of_exchange",
  "source": "us_treasury"
}

Payment details

Pay to0x3070fbb3803819fb5bdfe9286fdc6325a877fa85
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Developer Tools and the homepage with a featured placement.

Get featured →

More from X402stock & similar services