# ECB Currency Exchange Rates

> ECB Currency Exchange Rates is a paid API for AI agents from api.stablecoingateways.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-30).

Fetches European Central Bank euro reference rates for up to 30 currencies, with optional cross-rate calculation and amount conversion, for any date within the last 90 days.

## Facts

- Endpoint: GET https://api.stablecoingateways.com/v1/fx/rates?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ecb-currency-exchange-rates-5e26f856
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bCx1wW1e6wqDS8tapdKjn

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-exchange-rates-5e26f856
```

Example prompt: What's the ECB reference rate for converting 500 USD to EUR today? I need the official rate for an invoice I'm preparing.

## When to prefer this

Choose this endpoint when you need official ECB euro reference rates for invoicing, financial reporting, or pricing — especially when an auditable signed receipt is required. Prefer it over generic FX APIs when ECB provenance matters (e.g. EU regulatory compliance, VAT invoicing). Not suitable for live trading rates or rates older than 90 days.

## Known failure modes

- Date outside 90-day window returns an error — only dates within the last 90 days are supported
- Invalid or unsupported currency code (not among ECB's 29 currencies) returns an error or omits that currency
- Weekend or ECB non-trading day may return the most recent available rate date rather than the exact requested date
- Malformed date format (not YYYY-MM-DD) causes a validation error
- Payment failure via x402 protocol results in 402 response before data is returned

## How this service works

Currency exchange rates from the European Central Bank: euro reference rates for 29 currencies plus EUR (USD, GBP, JPY, CHF, CNY...), latest or any day in the last 90 days, with cross rates for any base and optional amount conversion (e.g. 100 USD to EUR). Use for invoicing, pricing and reporting. Reference rates, not transaction rates. Source: ECB; free at ecb.europa.eu. Signed receipt.

## Output

Returns a JSON object with the base currency, rate date, a map of target currency codes to exchange rate values (as floats), a note clarifying these are reference rates not transaction rates, a 'cross_rates_derived' boolean flag, and a signed Ed25519 receipt containing endpoint ID, timestamp, price paid, transaction hash, and request/response hashes for verification.

## 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"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "base": {
       "type": "string",
       "pattern": "^[A-Za-z]{3}$",
       "description": "Base currency (ISO 4217), default EUR"
      },
      "date": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
       "description": "Rate date YYYY-MM-DD within the last 90 days; default latest"
      },
      "amount": {
       "type": "string",
       "pattern": "^[0-9]+(\\.[0-9]+)?$",
       "description": "Optional amount to convert"
      },
      "symbols": {
       "type": "string",
       "description": "Comma-separated ISO 4217 codes; default all"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "data",
      "receipt"
     ],
     "properties": {
      "data": {
       "type": "object",
       "$schema": "https://json-schema.org/draft/2020-12/schema",
       "properties": {
        "base": {
         "type": "string"
        },
        "note": {
         "type": "string"
        },
        "rates": {
         "type": "object",
         "properties": {
          "EUR": {
           "type": "number"
          },
          "GBP": {
           "type": "number"
          },
          "JPY": {
           "type": "number"
          }
         }
        },
        "source": {
         "type": "string"
        },
        "window": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "rate_date": {
         "type": "string"
        },
        "provenance": {
         "type": "object",
         "description": "Additive evidence block (sg-provenance/1): per-fact source, retrieval time, limits; no score or verdict. Full schema in OpenAPI."
        },
        "requested_date": {},
        "cross_rates_derived":
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "base": "USD",
   "note": "ECB reference rates are for information only and are not transaction rates.",
   "rates": {
    "EUR": 0.89015489,
    "GBP": 0.74617233,
    "JPY": 157.87787075
   },
   "source": "European Central Bank euro foreign exchange reference rates. Source: ECB. This informat...",
   "window": [
    "2026-07-24"
   ],
   "rate_date": "2026-10-21",
   "requested_date": null,
   "cross_rates_derived": true
  },
  "receipt": {
   "v": 1,
   "ts": "2026-10-22T09:00:00Z",
   "sig": "hex",
   "price": {
    "asset": "USDC",
    "amount": "1000",
    "network": "eip155:84532"
   },
   "log_seq": 1,
   "tx_hash": "0x..",
   "endpoint_id": "fx-reference-rates-v1",
   "request_hash": "hex",
   "response_hash": "hex"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ecb-currency-exchange-rates-5e26f856/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.stablecoingateways.com](https://www.zero.xyz/host/api.stablecoingateways.com/llms.txt)
