# 2s Currency Conversion API

> 2s Currency Conversion API 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).

Converts an amount from one currency to another using live or historical ECB exchange rates

## Facts

- Endpoint: GET https://2s.io/api/convert/currency
- 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-currency-conversion-api-eb64882d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_332YNL80rMGryJ1J6JQX-

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-currency-conversion-api-eb64882d
```

Example prompt: What's 250 USD worth in EUR right now — and what was that same conversion worth on 2024-03-01?

## When to prefer this

Choose this endpoint when you need reliable, ECB-sourced exchange rates for fiat currencies, especially EUR-anchored pairs, with optional historical date lookup. Best for financial calculations, invoice conversion, or compliance use cases where ECB reference rates are preferred. Not suitable for cryptocurrency pairs or real-time tick-by-tick forex data.

## Known failure modes

- Invalid or unsupported ISO 4217 currency code returns an error — only currencies covered by ECB reference rates are supported
- Date too far in the past may not have available ECB data
- Missing required 'from' or 'to' query parameters causes a 400-level error
- Payment failure (insufficient USDC balance) blocks the request via x402 protocol

## How this service works

The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.

## Output

Returns the exchange rate between the two specified currencies, the converted result amount, the date of the rate used, and the data source (European Central Bank via Frankfurter). For historical queries, the rate date reflects the closest available ECB rate to the requested date.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "to": "EUR",
   "from": "USD",
   "amount": 250
  }
 }
}
```

## 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": [
      "from",
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "Target currency, 3-letter ISO 4217 (e.g. EUR)."
      },
      "date": {
       "type": "string",
       "description": "YYYY-MM-DD for a historical rate; omit for latest."
      },
      "from": {
       "type": "string",
       "description": "Source currency, 3-letter ISO 4217 (e.g. USD)."
      },
      "amount": {
       "type": "number",
       "description": "Amount of the source currency (default 1)."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-currency-conversion-api-eb64882d/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)
