81trust / 100

Fx Rates

by api.x-402.online in Documents & files

x402 APIPassing, checked 5 h ago

Official ECB foreign exchange reference rates for about 30 currencies, today or on any past date since 1999, from any base, with amount conversion Official ECB foreign exchange reference rates for about 30 currencies, today or on any past date since 1999, from any base currency, with optional amount conversion. Query: ?base=USD&symbols=EUR,GBP,JPY&date=2024-01-02&amount=250

GET https://api.x-402.online/v1/fx/rates

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
166 ms typical, 166 ms slowest 5%
Last check
5 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://api.x-402.online/v1/fx/rates?base=USD&symbols=EUR%2CGBP"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.x-402.online%2Fv1%2Ffx%2Frates
const res = await pay("https://api.x-402.online/v1/fx/rates?base=USD&symbols=EUR%2CGBP");
console.log(await res.json());

Example input

{
  "base": "USD",
  "symbols": "EUR,GBP"
}

Example output

{
  "amount": 1,
  "base": "USD",
  "date": "2026-09-25",
  "rates": {
    "EUR": 0.87696,
    "GBP": 0.75458
  }
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
5 h agoPassed402166 ms$0.005