# x402 FX Rates API

> x402 FX Rates API is a paid API for AI agents from call402.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-19).

Returns daily foreign exchange reference rates for one or more currency pairs, paid per-call via USDC microtransaction on Base mainnet.

## Facts

- Endpoint: POST https://call402.com/api/fx-rates?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-fx-rates-api-c755e74e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_l0-xu4rdRuqDQDBLU0b2s

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-fx-rates-api-c755e74e -d '<json body>'
```

Example prompt: What's today's exchange rate from USD to EUR and GBP? Convert 250 dollars into both currencies using the latest ECB reference rates.

## When to prefer this

Choose this endpoint when you need official ECB daily reference rates for one or many currency pairs with a pay-per-call model (no subscription required). Ideal for AI agents operating autonomously with a USDC wallet on Base, or when you want authoritative EU reference rates rather than commercial FX feeds. Not suitable for real-time tick data, bid/ask spreads, or high-frequency trading applications.

## Known failure modes

- HTTP 402 returned before payment — agent must attach PAYMENT-SIGNATURE header using x402 client and retry
- Invalid currency code returns an error or empty rates map
- Network or facilitator downtime causes request failure
- Insufficient USDC balance prevents payment and request completion
- Rates are daily reference rates only — not real-time mid-market or bid/ask spreads

## How this service works

USDC pay-per-call APIs for AI agents via the x402 protocol (v2, exact, Base mainnet). Send a request, receive HTTP 402 with payment requirements, pay with @x402/fetch or any x402 client, retry with the PAYMENT-SIGNATURE header.

## Output

A JSON object containing the base currency, the date of the rates, the requested amount, a source/note metadata block (citing ECB reference rates via Frankfurter), and a 'rates' map of target currency codes to converted values. For example: {base:'USD', date:'2026-10-16', amount:100, rates:{EUR:92.1, CNY:710.5}, meta:{source:'frankfurter (European Central Bank reference rates)', note:'Daily reference rates.'}}

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "base": {
   "type": "string",
   "description": "Base currency code (default USD)"
  },
  "amount": {
   "type": "number",
   "description": "Amount of base currency to convert (default 1)"
  },
  "symbols": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Optional target currency codes; omit for all"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "base": "USD",
  "date": "2026-10-16",
  "meta": {
   "note": "Daily reference rates.",
   "source": "frankfurter (European Central Bank reference rates)"
  },
  "rates": {
   "CNY": 710.5,
   "EUR": 92.1
  },
  "amount": 100
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-fx-rates-api-c755e74e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from call402.com](https://www.zero.xyz/host/call402.com/llms.txt)
