# x402 Exchange Rate Converter

> x402 Exchange Rate Converter is a paid API for AI agents from x402-trends-server.onrender.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-20).

Convert an amount from one currency to another using current reference exchange-rate data, returning the rate and converted amount.

## Facts

- Endpoint: GET https://x402-trends-server.onrender.com/api/exchange-rate?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-exchange-rate-converter-fa9075ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_T6rafx3d3kpstlpTGt5WM

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-exchange-rate-converter-fa9075ad
```

Example prompt: What's the current exchange rate from USD to EUR, and how much would 250 US dollars be in euros?

## When to prefer this

Choose this endpoint when you need a lightweight, on-demand currency conversion with a clear numeric result and exchange rate. It is ideal for single currency pair lookups rather than bulk or historical rate queries. At $0.01 USDC per call via x402, it is cost-effective for occasional agent-driven conversions in financial, travel, or invoicing workflows.

## Known failure modes

- Invalid or unsupported currency code returns an error
- Missing required 'from' or 'to' query parameters causes a 400 bad request
- Amount of zero or negative value is rejected due to exclusiveMinimum constraint
- Exchange rate data source may be temporarily unavailable causing a 5xx error
- Render.com cold start may introduce initial latency on first call

## How this service works

Convert money between currency codes using current reference exchange-rate data. Use this endpoint for USD, EUR, GBP, JPY, and other supported fiat conversions when an agent needs a rate, converted amount, or currency comparison.

## Output

Returns a JSON object containing the source currency code, target currency code, the input amount, the current exchange rate, the converted amount, the date of the rate, and the data source. For example: {status, from, to, amount, rate, convertedAmount, date, source}.

## 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"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "Three-letter target currency code such as EUR, USD, GBP, or JPY."
      },
      "from": {
       "type": "string",
       "description": "Three-letter source currency code such as USD, EUR, GBP, or JPY."
      },
      "amount": {
       "type": "number",
       "description": "Amount of source currency to convert. Defaults to 1.",
       "exclusiveMinimum": 0
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "status",
      "from",
      "to",
      "amount",
      "rate",
      "convertedAmount"
     ],
     "properties": {
      "to": {
       "type": "string"
      },
      "date": {
       "type": [
        "string",
        "null"
       ]
      },
      "from": {
       "type": "string"
      },
      "rate": {
       "type": "number"
      },
      "amount": {
       "type": "number"
      },
      "source": {
       "type": "string"
      },
      "status": {
       "type": "string"
      },
      "payment": {
       "type": "string"
      },
      "convertedAmount": {
       "type": "number"
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-exchange-rate-converter-fa9075ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-trends-server.onrender.com](https://www.zero.xyz/host/x402-trends-server.onrender.com/llms.txt)
