# x402 Exchange Rates (ECB/Frankfurter)

> x402 Exchange Rates (ECB/Frankfurter) is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Returns latest or historical FX exchange rates for 30+ currency pairs sourced from the European Central Bank, with optional amount conversion.

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/exchange-rates
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-767c7613
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AriBR6AORWSvDh1NUsoa7

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-deployer-x402-deployer-workers-dev-767c7613 -d '<json body>'
```

Example prompt: What's the ECB exchange rate for USD to EUR today, and how much would 750 USD be in euros?

## When to prefer this

Choose this endpoint when you need reliable, authoritative FX rates sourced from the European Central Bank with no commercial restrictions. Ideal for finance automation, invoice conversion, historical rate lookups, or multi-currency reporting. Prefer over commercial FX APIs when you need ECB-official rates without subscription overhead.

## Known failure modes

- Unsupported currency code returns an error or empty result
- Future date requested — ECB rates only available up to the current business day
- Weekend or ECB holiday date may return no rate (ECB does not publish on non-business days)
- Invalid date format (not YYYY-MM-DD) causes a parsing error
- Missing base currency defaults to USD — may return unexpected pair if not specified explicitly

## How this service works

Exchange rates. Latest or historical FX rates between currencies, sourced from the European Central Bank (Frankfurter API). 30+ currency pairs. Optional amount conversion. No commercial restrictions. Specify a base currency (default USD), an optional quote currency or list, an optional date (YYYY-MM-DD or 'latest'), and an optional amount to also receive a converted value when a single quote is supplied.

## Output

Returns the exchange rate(s) for the specified base/quote currency pair(s) on the requested date (or latest), sourced from the European Central Bank. When a single quote currency and an amount are provided, also returns the converted value.

## Example request

```json
{
 "input": {
  "body": {
   "base": "USD",
   "date": "latest",
   "quote": "EUR",
   "amount": 750
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [],
     "properties": {
      "base": {
       "type": "string",
       "description": "ISO 4217 base currency code (e.g. 'USD', 'EUR'). Default 'USD'."
      },
      "date": {
       "type": "string",
       "description": "'latest' (default) or a historical date in YYYY-MM-DD format."
      },
      "quote": {
       "description": "Single ISO 4217 quote currency, or array of codes. Omit for all available rates."
      },
      "amount": {
       "type": "number",
       "description": "Optional amount in the base currency. When a single quote is supplied, the response includes the converted amount."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "base": {
       "type": "string"
      },
      "date": {
       "type": "string"
      },
      "rates": {
       "type": "object",
       "properties": {
        "EUR": {
         "type": "number"
        },
        "GBP": {
         "type": "number"
        },
        "JPY": {
         "type": "number"
        }
       }
      },
      "source": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-767c7613/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
