# PayAgents Exchange Rates API

> PayAgents Exchange Rates API is a paid API for AI agents from demo.payagents.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Returns real-time fiat and crypto exchange rates for a specified base currency against a list of target currencies, gated by x402 micropayments.

## Facts

- Endpoint: POST https://demo.payagents.io/exchange-rates/latest
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payagents-exchange-rates-api-6ec6c8e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ltnKv9uoDxoMkqzGIL4rU

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 payagents-exchange-rates-api-6ec6c8e1 -d '<json body>'
```

Example prompt: What are the current exchange rates for EUR, GBP, JPY, and BTC against USD right now?

## When to prefer this

Choose this endpoint when you need real-time fiat and crypto exchange rates in a single API call, especially in agentic or automated pipelines that can handle x402 micropayment flows natively. It is well-suited for agents that need to convert or compare across multiple currencies simultaneously and can tolerate the small per-call USDC cost. Prefer it over free or cached alternatives when freshness and crypto pair coverage matter.

## Known failure modes

- Missing or invalid base currency symbol returns error or empty response
- Invalid target currency symbols may be omitted from the rates map
- Payment failure (insufficient USDC) results in 402 Payment Required before data is returned
- Rate data may be stale if upstream provider is slow or unavailable
- Empty symbols array may return all available rates or an error depending on implementation

## How this service works

Real-time fiat and crypto exchange rates API protected by PayAgents micropayments.

## Output

Returns a JSON object containing a rates map of target currency symbols to their current exchange rates relative to the base currency, along with the base currency, a timestamp, the data source, a success flag, a paid flag, and the price paid per call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "base": {
   "type": "string",
   "description": "Base currency symbol"
  },
  "symbols": {
   "type": "array",
   "description": "List of target currency symbols"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "type": "object",
   "properties": {
    "base": {
     "type": "string"
    },
    "rates": {
     "type": "object"
    }
   }
  },
  "paid": {
   "type": "boolean"
  },
  "price": {
   "type": "string"
  },
  "source": {
   "type": "string"
  },
  "success": {
   "type": "boolean"
  },
  "timestamp": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/payagents-exchange-rates-api-6ec6c8e1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from demo.payagents.io](https://www.zero.xyz/host/demo.payagents.io/llms.txt)
