BTC exchange rates

$0.005 per call · USDC via x402 · GET /api/exchange-rates

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. Send GET /api/exchange-rates with no required fields (2 optional) and pay $0.005 per call over x402 or MPP (there is no free tier). It returns a JSON object with source, fetchedAt, cached, base, count and 1 more.

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.

Category: Crypto & onchain data · Tags: crypto exchange-rates btc fiat gold cross-rate fx

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
currenciesstringnoOptional comma-separated unit codes to keep (usd, eur, eth, xau, ...). Default: all.
typestringnoOptional filter: crypto, fiat or commodity.

Example request

curl -i "https://agent402.tools/api/exchange-rates?currencies=usd%2Ceur%2Ceth%2Cxau"

Without payment this returns HTTP 402 Payment Required with the exact price for exchange-rates; any x402 v2 or MPP client pays it and retries.

Example response

{
  "source": "coingecko",
  "fetchedAt": "2026-08-22T13:20:00.000Z",
  "cached": false,
  "base": "BTC",
  "count": 4,
  "rates": [
    {
      "code": "usd",
      "name": "US Dollar",
      "unit": "$",
      "type": "fiat",
      "perBtc": 77018
    },
    {
      "code": "eur",
      "name": "Euro",
      "unit": "€",
      "type": "fiat",
      "perBtc": 65600.2
    },
    {
      "code": "eth",
      "name": "Ether",
      "unit": "ETH",
      "type": "crypto",
      "perBtc": 31.813
    },
    {
      "code": "xau",
      "name": "Gold - Troy Ounce",
      "unit": "XAU",
      "type": "commodity",
      "perBtc": 22.91
    }
  ]
}
FieldTypeAlways presentIn the example
sourcestringyescoingecko
fetchedAtstringyes2026-08-22T13:20:00.000Z
cachedbooleanyesfalse
basestringyesBTC
countnumberyes4
ratesarray of objectsyes4 items in the example

From an MCP client

catalog.call {
  "slug": "exchange-rates",
  "params": {
    "currencies": "usd,eur,eth,xau"
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for exchange-rates; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/exchange-rates?currencies=usd%2Ceur%2Ceth%2Cxau");

Related tools

Crypto technical indicators

$0.002 · POST /api/crypto-indicators

Technical indicators for one perpetual computed deterministically from Hyperliquid candles: RSI(14), MACD(12,26,9) with …

Known-address label lookup

FREE w/ compute · or $0.002 · POST /api/address-label

Label a known EVM address from a curated, committed dataset: major stablecoin + token contracts (the USDC and USDG contr…

Wallet token transfers (filtered)

$0.003 · POST /api/asset-transfers

Recent token transfers for a wallet on Base, Ethereum and other EVM chains, newest first. Filtered transfer log for an E…

Block info

$0.001 · GET /api/block-info

Header-level detail for one block on Ethereum, Base, Polygon, Arbitrum, or Optimism: hash, timestamp (unix + ISO), trans…

Latest block number

$0.001 · GET /api/block-number

The latest block number on Ethereum, Base, Polygon, Arbitrum, or Optimism: returns network, blockNumber (integer) and he…

Block receipts (one block, summarised)

$0.005 · POST /api/block-receipts

Every transaction receipt in one block, fetched as a single upstream read and summarised: tx count, succeeded vs failed,…