# 2s.io FX Rates (ECB via Frankfurter)

> 2s.io FX Rates (ECB via Frankfurter) is a paid API for AI agents from 2s.io, paid per call via x402, $0.0012/call, status unknown (last checked 2026-09-14).

Returns daily reference exchange rates from the European Central Bank for 30+ currencies, with optional historical lookup back to 1999 and optional amount conversion.

## Facts

- Endpoint: GET https://2s.io/api/fx/rates
- Price: $0.0012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-f8568615
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_61mNp-86zUiX150qlWcVX

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 2s-io-f8568615
```

Example prompt: What's today's ECB reference exchange rate from USD to EUR, GBP, and JPY — and how much would 250 USD convert to in each of those currencies?

## When to prefer this

Use this endpoint when you need official ECB daily reference rates for 30+ major currencies, especially when regulatory or financial accuracy is important. Prefer over scraped or unofficial sources when ECB provenance matters. Ideal for historical rate lookups back to 1999 on business days, or when converting a specific amount between currencies using standardized rates.

## Known failure modes

- Invalid ISO 4217 currency code returns an error or empty rates map
- Date falling on a weekend or ECB holiday returns no data (business days only)
- Date before 1999 is out of historical range and will fail
- Invalid date format (not YYYY-MM-DD) causes a bad request error
- Unsupported or misspelled symbols codes may be silently dropped or cause an error

## How this service works

Daily reference exchange rates from the European Central Bank (via Frankfurter). 30+ major currencies. Pass base = 3-letter ISO 4217 currency (default USD), optional symbols = comma-separated target codes (default = all available), optional date = YYYY-MM-DD for historical rates (history back to 1999, business days only; omit for latest), optional amount to convert (default 1). Returns base, date, amount, and a map of currency code → rate.

## Output

A JSON object containing the base currency code, the date of the rates (today or the requested historical date), the amount used for conversion, and a map of currency codes to their exchange rates relative to the base currency.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "base": "USD",
   "amount": 100,
   "symbols": "EUR,GBP,JPY"
  }
 }
}
```

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "properties": {
      "base": {
       "type": "string",
       "description": "3-letter ISO 4217 code (default USD)."
      },
      "date": {
       "type": "string",
       "description": "YYYY-MM-DD historical date; default latest."
      },
      "amount": {
       "type": "number",
       "description": "Amount of base currency to convert; default 1."
      },
      "symbols": {
       "type": "string",
       "description": "Comma-separated target codes; default all."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-f8568615/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
