# ECB FX Reference Rates API (fx.x402utils)

> ECB FX Reference Rates API (fx.x402utils) is a paid API for AI agents from fx.x402utils.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Returns European Central Bank official foreign-exchange reference rates for ~30 currencies, supporting latest rates and currency conversion via a pay-per-call x402 endpoint.

## Facts

- Endpoint: GET https://fx.x402utils.workers.dev/v1/rate?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ecb-fx-reference-rates-api-fx-x402utils-ed3ef264
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OU-feo7ZV_E5UTt4Hg3kI

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 ecb-fx-reference-rates-api-fx-x402utils-ed3ef264
```

Example prompt: What's the official ECB reference rate for USD to EUR and PLN right now? Use the ECB FX rates service to get today's fixing.

## When to prefer this

Choose this endpoint when you need official ECB reference rates — the authoritative, legally recognized daily fixings used in financial, accounting, and compliance contexts — rather than real-time market rates from a broker or exchange. Ideal when you need rates for ~30 major currencies, want a simple per-call pay-as-you-go model with no subscription, and your workflow requires a trustworthy, auditable source.

## Known failure modes

- Missing or invalid 'to' query parameter returns an error
- Unsupported currency code (outside ECB's ~30 covered currencies) returns an error or empty rates
- Payment failure via x402 (insufficient USDC balance) blocks the request
- ECB data not yet published for today (e.g. before daily fixing) may return previous business day's date
- Network or Cloudflare Worker timeout returns a 5xx error

## How this service works

Official ECB foreign-exchange reference rates for agents: latest rates, conversion and historical fixings for ~30 currencies. Paid per call via x402 (USDC on Base).

## Output

Returns a JSON object with the base currency, the fixing date, and a map of target currency codes to their exchange rates (e.g. {"base":"USD","date":"2026-09-24","rates":{"EUR":0.8797,"PLN":3.8553}}). Rates are sourced from ECB official daily fixings.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "comma-separated targets"
      },
      "from": {
       "type": "string",
       "description": "base currency (ISO 4217)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "base": "USD",
  "date": "2026-09-24",
  "rates": {
   "EUR": 0.8797,
   "PLN": 3.8553
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ecb-fx-reference-rates-api-fx-x402utils-ed3ef264/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fx.x402utils.workers.dev](https://www.zero.xyz/host/fx.x402utils.workers.dev/llms.txt)
