# ECB Historical FX Rates

> ECB Historical FX Rates 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 official European Central Bank foreign-exchange reference rates for a specific historical date, converting between ~30 currencies.

## Facts

- Endpoint: GET https://fx.x402utils.workers.dev/v1/historical?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-historical-fx-rates-1fbc9e16
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lHPXyHOd6f_YWTjN34tNf

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-historical-fx-rates-1fbc9e16
```

Example prompt: What was the official ECB exchange rate from USD to EUR on January 15, 2026?

## When to prefer this

Use this endpoint when you need official, authoritative ECB benchmark exchange rates for a specific past date — ideal for financial reporting, compliance, invoice reconciliation, or historical portfolio valuation. Prefer this over real-time FX feeds when regulatory or audit-grade historical accuracy is required, or when you need the ECB fixing specifically (not market mid-rates). Not appropriate for live/real-time rate quotes or currency pairs outside the ECB's ~30 currency basket.

## Known failure modes

- Non-business day requested (ECB does not publish rates on weekends or holidays) — may return nearest available date or an error
- Unsupported currency code — ECB covers ~30 currencies, exotic pairs will not be available
- Date too far in the past — ECB historical data has a limited range
- Missing required 'date' or 'to' query parameters — returns 400 or validation error
- Payment not completed (x402) — returns 402 Payment Required before data is served

## 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

A JSON object containing the base currency, the requested rate date as confirmed by ECB, and a rates map with each target currency code mapped to its exchange rate relative to the base currency (e.g. {"base":"USD","rates":{"EUR":0.86},"rate_date":"2026-01-15"}).

## 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": [
      "date",
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "targets"
      },
      "date": {
       "type": "string",
       "description": "YYYY-MM-DD"
      },
      "from": {
       "type": "string",
       "description": "base"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "base": "USD",
  "rates": {
   "EUR": 0.86
  },
  "rate_date": "2026-01-15"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ecb-historical-fx-rates-1fbc9e16/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)
