# agent402.tools FX Historical Rate Lookup

> agent402.tools FX Historical Rate Lookup is a paid API for AI agents from agent402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Returns the European Central Bank reference exchange rate for a currency pair on a specific historical date

## Facts

- Endpoint: GET https://agent402.tools/api/fx-historical
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-fx-historical-rate-lookup-f0549e6a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__jR5fQsESEd_YYgeYYXfq

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 agent402-tools-fx-historical-rate-lookup-f0549e6a
```

Example prompt: What was the USD to EUR exchange rate on January 2, 2024, according to European Central Bank reference rates?

## When to prefer this

Use this endpoint when you need an official, authoritative historical FX rate anchored to ECB reference data for a specific past date — ideal for accounting, compliance, invoicing reconciliation, or financial reporting that requires a reproducible, non-real-time rate. Prefer this over live quote endpoints when the date is in the past and you need a published reference rate rather than a market price.

## Known failure modes

- Invalid or unsupported currency code returns an error (ECB only covers a limited set of currencies)
- Date too far in the past or in the future may return no data
- Missing required query parameters (from, to, date) results in a 400-level error
- Date format not ISO 8601 (YYYY-MM-DD) may be rejected

## How this service works

Historical foreign-exchange rate for a specific date using European Central Bank reference rates (via Frankfurter). Returns the rate that was published on (or rolled forward to) the requested date. ?from=USD&to=EUR&date=2024-01-02

## Output

A JSON object containing the historical ECB reference exchange rate for the requested currency pair on the specified date (rolled forward if no rate was published on that exact date, e.g. weekends/holidays).

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "from",
      "to",
      "date"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "3-letter target currency code, e.g. EUR"
      },
      "date": {
       "type": "string",
       "description": "ISO date (YYYY-MM-DD)"
      },
      "from": {
       "type": "string",
       "description": "3-letter source currency code, e.g. USD"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "from",
      "to",
      "date",
      "rate",
      "source"
     ],
     "properties": {
      "to": {
       "type": "string"
      },
      "date": {
       "type": "string"
      },
      "from": {
       "type": "string"
      },
      "rate": {
       "type": "number"
      },
      "source": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "to": "EUR",
  "date": "2024-01-02",
  "from": "USD",
  "rate": 0.9128,
  "source": "ECB via Frankfurter"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-fx-historical-rate-lookup-f0549e6a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
