# Agent402 Exchange Rates – BTC-based multi-asset rate lookup

> Agent402 Exchange Rates – BTC-based multi-asset rate lookup is a paid API for AI agents from agent402.tools, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns real-time Bitcoin-denominated exchange rates for fiat currencies, cryptocurrencies, and commodities, filterable by type or specific currency codes.

## Facts

- Endpoint: GET https://agent402.tools/api/exchange-rates
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-exchange-rates-btc-based-multi-asset-rate-lookup-cf5a0e59
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IzhTeeyGfZJ9BGb8cBO2J

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 agent402-exchange-rates-btc-based-multi-asset-rate-lookup-cf5a0e59
```

Example prompt: Can you pull the latest Bitcoin exchange rates for USD, EUR, ETH, and gold right now — just those four currencies?

## When to prefer this

Choose this endpoint when you need real-time, BTC-denominated exchange rates across a broad mix of fiat currencies, cryptocurrencies, and commodities in a single call. It is ideal for agents that price transactions in Bitcoin, build multi-asset dashboards, or need gold/commodity rates alongside crypto rates. Prefer this over generic FX APIs when BTC is the base unit, or when you want commodity and crypto rates in the same response. It requires no API key — payment is per-call via x402/USDC wallet.

## Known failure modes

- Invalid type filter value returns an error or empty rates array
- Unknown currency code in 'currencies' param may be silently ignored or return empty results
- Upstream CoinGecko outage may cause stale or failed response
- Malformed comma-separated currencies list may result in parse errors
- Rate limiting or payment failure returns 402 with payment required details

## How this service works

BTC-denominated exchange rates for ~60 units: crypto (ETH, LTC, BNB, SOL, ...), fiat (USD, EUR, JPY, ...) and commodities (gold, silver ounces), each as units per 1 BTC with name and type. Optional `currencies` filter (comma-separated unit codes) and `type` filter (crypto, fiat, commodity). One call gives a consistent cross-rate table: BTC in gold ounces, ETH/BTC, USD/JPY via BTC. Cached in-process for 60 seconds.

## Output

A JSON object with base currency (BTC), a list of rate objects each containing code, name, type, unit symbol, and per-BTC rate, plus metadata fields: total count, whether the result was cached, the data source (e.g. coingecko), and the fetch timestamp in ISO 8601 format.

## 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",
     "properties": {
      "type": {
       "type": "string",
       "description": "Optional filter: crypto, fiat or commodity."
      },
      "currencies": {
       "type": "string",
       "description": "Optional comma-separated unit codes to keep (usd, eur, eth, xau, ...). Default: all."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "source",
      "fetchedAt",
      "cached",
      "base",
      "count",
      "rates"
     ],
     "properties": {
      "base": {
       "type": "string"
      },
      "count": {
       "type": "integer"
      },
      "rates": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "code": {
          "type": "string"
         },
         "name": {
          "type": "string"
         },
         "type": {
          "type": "string"
         },
         "unit": {
          "type": "string"
         },
         "perBtc": {
          "type": "number"
         }
        }
       }
      },
      "cached": {
       "type": "boolean"
      },
      "source": {
       "type": "string"
      },
      "fetchedAt": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "base": "BTC",
  "count": 4,
  "rates": [
   {
    "code": "usd",
    "name": "US Dollar",
    "type": "fiat",
    "unit": "$",
    "perBtc": 77018
   },
   {
    "code": "eur",
    "name": "Euro",
    "type": "fiat",
    "unit": "€",
    "perBtc": 65600.2
   },
   {
    "code": "eth",
    "name": "Ether",
    "type": "crypto",
    "unit": "ETH",
    "perBtc": 31.813
   },
   {
    "code": "xau",
    "name": "Gold - Troy Ounce",
    "type": "commodity",
    "unit": "XAU",
    "perBtc": 22.91
   }
  ],
  "cached": false,
  "source": "coingecko",
  "fetchedAt": "2026-08-22T13:20:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-exchange-rates-btc-based-multi-asset-rate-lookup-cf5a0e59/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
