# ECB Currency Rates

> ECB Currency Rates is a paid API for AI agents from ca-tax-api-mainnet.lxtap.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-23).

Returns European Central Bank daily foreign exchange reference rates for ~30 major currencies, from any base currency, for the latest available date or a specific past date.

## Facts

- Endpoint: GET https://ca-tax-api-mainnet.lxtap.workers.dev/fx/rates?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ecb-currency-rates-b1c010bc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8a6A8vvkTXNmWMUTGz1Zk

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-currency-rates-b1c010bc
```

Example prompt: What are the ECB official exchange rates for EUR, GBP, and JPY using USD as the base currency as of 2024-03-15?

## When to prefer this

Choose this endpoint when you need official, authoritative ECB daily reference exchange rates — particularly for regulatory compliance, tax calculations, financial auditing, or any use case requiring a recognized institutional rate source. Prefer it over commercial FX APIs when official ECB rates are specifically required (e.g., EU accounting standards, VAT filings). Rates are updated once per ECB business day, so it is not suitable for real-time intraday trading data.

## Known failure modes

- Invalid currency code (not a 3-letter ISO 4217 code) returns an error or empty rates
- Date falls on a weekend or ECB non-business day — no rates published, returns error or nearest available
- Date too far in the past or in the future — ECB data may not be available
- Unrecognized target currency in the symbols list — may be omitted from response
- Network or worker outage results in a 5xx error

## How this service works

Pay-per-call data for AI agents, paid in USDC on Base with x402: token risk checks (rug check) on Base, Ethereum, Arbitrum, Optimism, Polygon and Solana, onchain reads (balances, transactions, gas, contracts, NFTs, whale trades, new pools, ENS and Basenames), ECB exchange rates, and Canadian sales tax and business days.

## Output

Returns a JSON object containing the effective date of the rates (the ECB business day they were published), the base currency used, and a map of target currency codes to their corresponding exchange rate values relative to the base.

## 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",
     "properties": {
      "base": {
       "type": "string",
       "pattern": "^[A-Za-z]{3}$",
       "description": "ISO 4217 base currency, default USD"
      },
      "date": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
       "description": "Past date YYYY-MM-DD; latest if omitted"
      },
      "symbols": {
       "type": "string",
       "pattern": "^[A-Za-z]{3}(,[A-Za-z]{3})*$",
       "description": "Comma-separated target currencies; all if omitted"
      }
     },
     "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": "USD",
  "date": "2026-10-22",
  "rates": {
   "CAD": 1.4034,
   "EUR": 0.89246,
   "GBP": 0.74761
  },
  "source": "European Central Bank reference rates via frankfurter.dev"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ecb-currency-rates-b1c010bc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ca-tax-api-mainnet.lxtap.workers.dev](https://www.zero.xyz/host/ca-tax-api-mainnet.lxtap.workers.dev/llms.txt)
