# FX Reference Rates API – Historical Rates

> FX Reference Rates API – Historical Rates is a paid API for AI agents from fx-reference-rates.regnotes.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-30).

Returns ECB foreign exchange reference rates for a specific historical date, with any base currency, falling back to the nearest prior publication day if the requested date had no ECB publication.

## Facts

- Endpoint: GET https://fx-reference-rates.regnotes.workers.dev/v1/rates/historical?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fx-reference-rates-api-historical-rates-8c5a9ee4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PUnsm-nRqaZvTWHYphNKD

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 fx-reference-rates-api-historical-rates-8c5a9ee4
```

Example prompt: What were the ECB reference rates on March 15, 2024 with USD as the base currency? Include GBP, EUR, and JPY.

## When to prefer this

Use this endpoint when you need official ECB foreign exchange reference rates for a specific past date, especially for financial reporting, compliance, invoice reconciliation, or audit purposes where the authoritative ECB rate (not a market rate) is required. Prefer this over real-time FX endpoints when historical accuracy and ECB provenance matter. The automatic fallback to the previous publication day makes it reliable even for weekends and holidays.

## Known failure modes

- Date before ECB data coverage — no historical data available for very early dates
- Invalid date format — must be YYYY-MM-DD pattern
- Invalid base or symbol currency code — must be one of the 30 supported 3-letter ISO codes
- Date in the far future — no ECB data available yet
- Malformed symbols parameter — comma-separated 3-letter codes required

## How this service works

ECB reference rates on a given date in any base; non-publication days fall back to the previous publication day (as_of).

## Output

A JSON object containing the base currency, the actual publication date used (as_of), the originally requested date, and a map of currency codes to exchange rates. If the requested date falls on a non-publication day (weekend or ECB holiday), the as_of field reflects the most recent prior publication date.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "date"
     ],
     "properties": {
      "base": {
       "type": "string",
       "pattern": "^[A-Z]{3}$",
       "description": "One of: AUD, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TRY, USD, ZAR"
      },
      "date": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "symbols": {
       "type": "string"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "base": "EUR",
  "as_of": "2026-06-30",
  "rates": {
   "GBP": 0.86178,
   "USD": 1.1394
  },
  "requested_date": "2026-06-30"
 }
}
```

## More

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