# Macro Data API – ECB FX Reference Rate

> Macro Data API – ECB FX Reference Rate is a paid API for AI agents from macro-data-api-313m.onrender.com, paid per call via x402, $0.011/call, status down (last checked 2026-10-30).

Returns the ECB euro reference exchange rate between two currencies for a given date, including cross rates such as CHF/USD, with source attribution.

## Facts

- Endpoint: GET https://macro-data-api-313m.onrender.com/v1/fx?utm_source=zero.xyz
- Price: $0.011/call
- Payment: x402
- Status: down
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/macro-data-api-ecb-fx-reference-rate-15f635b0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lQGqMlqkB9VSX9ma1R1xs

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 macro-data-api-ecb-fx-reference-rate-15f635b0
```

Example prompt: What's the ECB reference exchange rate for EUR to USD today? And also, what was the CHF/USD cross rate on 2024-03-15?

## When to prefer this

Choose this endpoint when you need the official ECB euro reference exchange rate — authoritative, source-attributed central bank data — rather than real-time market rates. Ideal for accounting, compliance, financial reporting, or any use case requiring a recognized official benchmark rate. Also useful when you need historical cross rates (e.g. CHF/USD) derived from ECB euro reference data. Prefer this over live market data feeds when regulatory or audit-grade sourcing is required.

## Known failure modes

- Unsupported currency pair not covered by ECB reference rates returns an error or empty result
- Date falls on a weekend or ECB non-publication day, returning the closest available rate or an error
- Invalid ISO currency code format causes a validation error
- Future dates return an error as rates are not forecasted
- Rate not yet published for today if requested before ECB daily publication time

## How this service works

Returns the ECB euro reference exchange rate between two currencies for a date, including cross rates such as CHF/USD, with source attribution.

## Output

Returns the ECB official reference exchange rate for the requested currency pair on the specified date (or the latest available date), including the base currency, quote currency, rate value, date of the rate, and source attribution indicating the data comes from the European Central Bank.

## 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": [
      "quote"
     ],
     "properties": {
      "base": {
       "type": "string",
       "description": "ISO currency code, default EUR"
      },
      "date": {
       "type": "string",
       "description": "Optional date YYYY-MM-DD. Default: latest available."
      },
      "quote": {
       "type": "string",
       "description": "ISO currency code, e.g. USD"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/macro-data-api-ecb-fx-reference-rate-15f635b0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from macro-data-api-313m.onrender.com](https://www.zero.xyz/host/macro-data-api-313m.onrender.com/llms.txt)
