80trust / 100

Fx Rates

by 1gateway in Documents & files

x402 APIPassing, checked 3 h ago

Use when you need an official daily FX rate or currency conversion (USD, EUR, KRW, JPY, CNY, GBP + 24 more). Input: base (default EUR), optional symbols (comma list), date (YYYY-MM-DD, last ~90 days; weekends use the prior fixing), amount. Output: JSON rates for the fixing date, % change vs prior fixing, converted amounts, raw ECB EUR rates. Source: ECB statistics, updated each TARGET day ~16:00 CET; reference only. Example: ?base=USD&symbols=KRW,JPY&amount=100

GET https://1gateway.dev/v1/fx/rates

Last 30 days

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

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://1gateway.dev/v1/fx/rates?amount=100&base=USD&date=2026-10-09&symbols=KRW%2CJPY%2CEUR"
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.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2F1gateway.dev%2Fv1%2Ffx%2Frates
const res = await pay("https://1gateway.dev/v1/fx/rates?amount=100&base=USD&date=2026-10-09&symbols=KRW%2CJPY%2CEUR");
console.log(await res.json());

Example input

{
  "amount": 100,
  "base": "USD",
  "date": "2026-10-09",
  "symbols": "KRW,JPY,EUR"
}

Example output

{
  "amount": 100,
  "attribution": "Source: ECB statistics (euro foreign exchange reference rates). The rates are available free of charge from the ECB website. Cross rates (non-EUR base) are der…",
  "base": "USD",
  "changePctVsPrevious": {
    "EUR": -0.18,
    "JPY": -0.01,
    "KRW": -0.15
  },
  "converted": {
    "EUR": 89.2379,
    "JPY": 15825.4507,
    "KRW": 134148.6704
  },
  "date": "2026-10-09",
  "derived": true,
  "ecbEurRates": {
    "JPY": 177.34,
    "KRW": 1503.27,
    "USD": 1.1206
  },
  "names": {
    "EUR": "Euro",
    "JPY": "Japanese yen",
    "KRW": "South Korean won",
    "USD": "US dollar"
  },
  "notes": [
    "ECB reference rates are set once per TARGET business day around 16:00 CET; weekends/holidays use the previous publication."
  ],
  "previousDate": "2026-10-08",
  "rates": {
    "EUR": 0.8923791,
    "JPY": 158.2545,
    "KRW": 1341.487
  },
  "requestedDate": null
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed40245 ms$0.002