# CertainData FX Rate (ECB Mid-Market)

> CertainData FX Rate (ECB Mid-Market) is a paid API for AI agents from api.certaindata.ai, paid per call via x402, $0.007/call, status unknown (last checked 2026-09-13).

Returns the European Central Bank mid-market reference rate for a given base/quote currency pair, either the latest or a historical date.

## Facts

- Endpoint: GET https://api.certaindata.ai/ca054d66abad4d6ea80ba43013b61743-cd/fx-rate/fx/:base/:quote
- Price: $0.007/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/certaindata-fx-rate-ecb-mid-market-eebfef17
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5zTWoErAmJnhH-hImiRW8

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 certaindata-fx-rate-ecb-mid-market-eebfef17
```

Example prompt: What is the ECB mid-market reference rate for EUR to USD today? Also, what was it on 2024-06-01?

## When to prefer this

Choose this endpoint when you need an authoritative, ECB-sourced mid-market exchange rate for compliance, accounting, reporting, or financial applications that require an official reference rate rather than a live market rate. Ideal for EUR-centric pairs and historical lookups aligned to ECB publication dates.

## Known failure modes

- Invalid or unsupported currency ISO code returns an error
- Date out of ECB historical range returns no data or error
- Weekend/holiday dates may return the last available business day rate or an error
- Missing required path parameters (base or quote) returns a 400/422 error
- Network or upstream ECB data availability issues may cause 5xx errors

## How this service works

Mid-market reference rate for a base/quote currency pair, from the European Central Bank.

## Output

Returns the mid-market FX rate sourced from the European Central Bank for the specified base/quote currency pair, either the latest available or for the requested historical 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",
    "pathParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "base",
      "quote"
     ],
     "properties": {
      "base": {
       "type": "string",
       "description": "Base currency as a 3-letter ISO code, e.g. EUR."
      },
      "quote": {
       "type": "string",
       "description": "Quote currency as a 3-letter ISO code, e.g. USD."
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "date": {
       "type": "string",
       "description": "Optional. A specific date (YYYY-MM-DD) for a historical rate, e.g. 2026-01-01. Omit for the latest."
      }
     }
    }
   },
   "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/certaindata-fx-rate-ecb-mid-market-eebfef17/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.certaindata.ai](https://www.zero.xyz/host/api.certaindata.ai/llms.txt)
