# api2ls.com FX Rates

> api2ls.com FX Rates is a paid API for AI agents from api2ls.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns live ECB-reference fiat foreign-exchange rates and optional currency conversion amounts for one or more target currencies

## Facts

- Endpoint: GET https://api2ls.com/api/fx
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api2ls-com-fx-rates-fd09b81a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JaAKEtVhEd-_GK9XLkOFQ

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 api2ls-com-fx-rates-fd09b81a
```

Example prompt: What's the current exchange rate from USD to EUR and GBP — and how much would 250 US dollars be in each currency right now?

## When to prefer this

Use this endpoint when you need live, ECB-reference fiat foreign-exchange rates for one or more currency pairs in a single call, especially when you also want the converted monetary amount. Prefer it over crypto-price endpoints for fiat-only conversions and over static rate tables when freshness matters.

## Known failure modes

- Unsupported or invalid currency code returns an error response
- Missing required 'to' query parameter causes a 400-level error
- ECB rate feed temporarily unavailable may return stale or error response
- Payment not processed (x402) returns 402 Payment Required before data is served

## How this service works

Get live fiat foreign-exchange rates (ECB reference rates)

## Output

A JSON object containing a success flag, the base currency, the as-of date, a rates map with each target currency code and its exchange rate, the queried amount, and a converted map showing the equivalent amount in each requested target currency.

## 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": [
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "Target currency code(s), comma-separated, e.g. EUR,GBP"
      },
      "from": {
       "type": "string",
       "description": "Base currency code (default USD)"
      },
      "amount": {
       "type": "number",
       "description": "Amount to convert (default 1)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "success",
      "base",
      "rates"
     ],
     "properties": {
      "asOf": {
       "type": "string"
      },
      "base": {
       "type": "string"
      },
      "date": {
       "type": "string"
      },
      "rates": {
       "type": "object"
      },
      "amount": {
       "type": "number"
      },
      "success": {
       "type": "boolean"
      },
      "converted": {
       "type": "object"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api2ls-com-fx-rates-fd09b81a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api2ls.com](https://www.zero.xyz/host/api2ls.com/llms.txt)
