# x402 FX Rate API

> x402 FX Rate API is a paid API for AI agents from x402-fx-rate.netlify.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-17).

Returns a real-time foreign exchange rate for a specified currency pair, paid per call in USDC via the x402 protocol

## Facts

- Endpoint: GET https://x402-fx-rate.netlify.app/v1/fx?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-fx-rate-api-3be53991
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7NjPBx70YI9DvKmRrum57

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 x402-fx-rate-api-3be53991
```

Example prompt: What's the current exchange rate from USD to EUR?

## When to prefer this

Choose this endpoint when you need a per-call, no-signup FX rate lookup paid in USDC via x402 — ideal for autonomous AI agents that lack API key management but can execute micropayments on Base. Best for real-time, single-pair lookups across a broad range of 160+ currency pairs without account infrastructure overhead.

## Known failure modes

- Unsupported currency pair — returns error if either currency code is not among the 160+ supported pairs
- Payment failure — x402 payment in USDC on Base is required; missing or invalid payment header results in HTTP 402
- Invalid currency code format — malformed or unrecognized currency codes (e.g. typos) may return an error
- Network or service unavailability — the Netlify-hosted service may be temporarily unavailable

## How this service works

FX rates for AI agents — 160+ currency pairs. Paid per call in USDC on Base via the x402 protocol (v2, exact scheme). No API keys, no accounts.

## Output

Returns an exchange rate value for the requested currency pair (e.g. how many units of the target currency equal one unit of the source currency), drawn from a pool of 160+ supported currency pairs. The response is a JSON object containing the rate data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "to",
  "from"
 ],
 "properties": {
  "to": {
   "type": "string",
   "description": "Target currency code, e.g. EUR"
  },
  "from": {
   "type": "string",
   "description": "Source currency code, e.g. USD"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-fx-rate-api-3be53991/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-fx-rate.netlify.app](https://www.zero.xyz/host/x402-fx-rate.netlify.app/llms.txt)
