x402-apis.pages.dev/v1/fx-rates
Use when an agent needs an official exchange rate to convert prices, invoices or portfolios: ECB euro reference rates for ~30 currencies (USD, GBP, CHF, JPY, CNY …), latest or for any day since 1999, with any base currency (cross rates computed from the ECB fix). Returns the exact rate date. Source named in every answer. Bad input: HTTP 400 before payment; unknown currency or outage is not charged
GET
https://x402-apis.pages.dev/v1/fx-ratesUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://x402-apis.pages.dev/v1/fx-rates?base=USD&symbols=EUR%2CCHF%2CGBP");
console.log(await res.json());Example input
{
"base": "USD",
"symbols": "EUR,CHF,GBP"
}More from Official Macro & FX Data
- x402-apis.pages.dev/v1/inflationUse when an agent needs the official inflation rate (year-on-year consumer prices) for a country: Eurostat HICP for the euro area, EU and 36 European countries (incl. CH, NO, TR) and US CPI-U from the Bureau of Labor Statistics. Latest month plus up to 36 months of history, flash estimates flagged. Source named in every answer. Bad input: HTTP 400 before payment; outage is not charged.0.002
- x402-apis.pages.dev/v1/interest-ratesUse when an agent needs today's central bank rates for loans, savings, valuation or macro answers: ECB key rates (deposit facility, main refinancing, marginal lending, with the date they took effect) and US Fed funds target range, effective fed funds rate (EFFR) and SOFR from the New York Fed. Official sources only, named in every answer. region=EA, US or all (default). Bad input: HTTP 400 before 0.002
- x402-apis.pages.dev/v1/treasury-yieldsUse when an agent needs US government bond yields, a risk-free rate or the yield curve (e.g. 2Y/10Y spread, recession signal, discounting): official US Treasury daily par yield curve, 1 month to 30 years, latest or any day since 1990 (weekends/holidays return the previous business day). Includes 10Y-2Y and 10Y-3M spreads. Source named in every answer. Bad input: HTTP 400 before payment; outage is 0.002
