# 2s FX Timeseries — Historical Currency Exchange Rates

> 2s FX Timeseries — Historical Currency Exchange Rates is a paid API for AI agents from 2s.io, paid per call via x402, $0.00144/call, status unknown (last checked 2026-09-14).

Returns a time series of daily foreign exchange rates (with summary stats) for one or more currency pairs over a specified date range, sourced from ECB reference rates.

## Facts

- Endpoint: GET https://2s.io/api/fx/timeseries
- Price: $0.00144/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-fx-timeseries-historical-currency-exchange-rates-50162927
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bG0YuNo-iv4x5gfgR8QsM

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-fx-timeseries-historical-currency-exchange-rates-50162927
```

Example prompt: Can you pull the daily USD to EUR and USD to GBP exchange rates from January 1 2025 through March 31 2025, and give me a summary showing the min, max, mean, and overall percent change for each currency over that period?

## When to prefer this

Use this endpoint when you need historical daily FX rate data over a date range with statistical summaries (min/max/mean/change), especially for ECB reference rates. Prefer this over spot-rate endpoints when trend analysis, range statistics, or multi-day series are needed. Ideal for financial reporting, currency risk assessment, accounting reconciliation, and macroeconomic research using authoritative ECB data. Pay-per-call with no API key required makes it convenient for one-off or automated agent queries.

## Known failure modes

- Missing required 'start' date parameter returns an error
- Invalid ISO 4217 currency codes return no data or error
- Future date ranges return empty or partial data
- Non-trading days (weekends/holidays) have no observations, reducing count
- Unsupported base currency may produce no results

## How this service works

Historical daily exchange-rate series from the European Central Bank (via Frankfurter), with computed summary statistics. Pass base = 3-letter ISO 4217 currency (default USD), start = YYYY-MM-DD, optional end = YYYY-MM-DD (default = latest available), optional symbols = comma-separated target codes (default all), optional amount to scale rates (default 1). Range is capped at 366 days. Returns, per target currency, first/last/min/max/mean rate plus absolute and percentage change over the window, alongside the full daily series. ECB publishes on business days only; weekends and holidays are omitted.

## Output

A JSON object containing: a daily series map of date → {currency: rate}, and an items array per currency with summary stats (min, max, mean, first, last, change, pctChange, count), plus metadata (base, start, end, amount, observations) and source attribution (Frankfurter/ECB). All rates are ECB official daily reference rates.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "end": "2025-03-31",
   "base": "USD",
   "start": "2025-01-01",
   "symbols": "EUR,GBP"
  }
 }
}
```

## 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": {
     "required": [
      "start"
     ],
     "properties": {
      "end": {
       "type": "string",
       "description": "Inclusive end date YYYY-MM-DD; default latest."
      },
      "base": {
       "type": "string",
       "description": "3-letter ISO 4217 code (default USD)."
      },
      "start": {
       "type": "string",
       "description": "Inclusive start date YYYY-MM-DD."
      },
      "amount": {
       "type": "number",
       "description": "Amount of base currency to scale rates; 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-fx-timeseries-historical-currency-exchange-rates-50162927/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)
