# GET /convert/crypto: $0.001 per call

Convert between crypto and fiat at live rates: BTC, ETH, SOL, USDC and hundreds more against USD, GBP, EUR and 150+ currencies, either way, or crypto to crypto. Pass ?amount=0.5&from=BTC&to=GBP. Rate from Coinbase, cross-checked against Kraken's last trade where Kraken lists the pair, with the gap shown.

- **Price:** $0.001 in USDC, the same on Base, Solana, Polygon, Arbitrum. Failed calls are never charged.
- **Free trial:** yes, 20 free calls a day from Claude, Cursor or any MCP client ([set-up](/mcp/setup)).
- **Answers cached for:** 1 min
- **Data sources:** Coinbase exchange rates (free, public); Kraken public ticker (free)
- **Lane:** Company financials & money ([OpenAPI](/openapi/finance.json))
- **Live health:** [status page](/status)

## Free sample

See an answer for the demo input first, free (no payment, 10 a minute): [https://aayatai.com/sample/crypto-convert](/sample/crypto-convert). It is a stored real answer when we have one, otherwise an example marked `"kind": "illustrative"`.

```bash
curl "https://aayatai.com/sample/crypto-convert"
```

## 1. See the price (free)

Call it without paying: you get `402 Payment Required` and a `PAYMENT-REQUIRED` header with the exact price and where to pay.

```bash
curl -i "https://aayatai.com/convert/crypto?amount=0.5&from=BTC&to=GBP"
```

## 2. Pay and call (TypeScript)

```bash
npm install @x402/fetch @x402/evm viem
```

```ts
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

// A wallet used only by your agent, holding a little USDC on Base.
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);
const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});

const res = await pay("https://aayatai.com/convert/crypto?amount=0.5&from=BTC&to=GBP");
console.log(await res.json());
```

## 3. Or as an MCP tool

```ts
// MCP server: https://aayatai.com/mcp (Streamable HTTP). With the x402 MCP client (see /start):
const result = await client.callTool("crypto-convert", {"amount":0.5,"from":"BTC","to":"GBP"});
```

## Inputs

- `amount` (number; default `1`): How much of 'from' to convert.
- `from` **(required)** (string): Symbol to convert from, e.g. BTC, ETH, USDC, GBP.
- `to` **(required)** (string): Symbol to convert to, e.g. GBP, USD, EUR, BTC.

Bad inputs are rejected with HTTP 400 before any payment is asked for.

## Example answer

Example only: the shape of an answer, with placeholder addresses and made-up figures. It is not data about any real token or wallet; call the service (or its free sample) for real results.

```json
{
  "amount": 0.5,
  "from": "BTC",
  "to": "GBP",
  "result": 31648.05,
  "rate": 63296.1,
  "inverseRate": 0.000015798762,
  "crossCheck": {
    "source": "Kraken last trade",
    "rate": 63295.1,
    "differencePct": 0
  },
  "at": "2026-09-29T09:10:00Z",
  "note": "Indicative mid-market rate, not a quote you can trade at; exchanges add spreads and fees.",
  "sources": [
    "Coinbase exchange rates",
    "Kraken"
  ]
}
```

## Related

- [GET /us/company/financials](/services/us-company-financials) ($0.01): Headline financials of any SEC-registered company by ticker, CIK or name, as filed: revenue, gross/operating/net income, EPS, assets, liabilities, equity, cash,
- [GET /us/company/filings](/services/us-company-filings) ($0.005): Latest SEC filings of any US-registered company by ticker, CIK or name: 10-K, 10-Q, 8-K (items spelled out, e.g.
- [GET /us/filings/search](/services/us-filings-search) ($0.005): Search the full text of SEC filings since 2001 for a word or "exact phrase": which companies mentioned it, in which 10-K, 10-Q, 8-K (items spelled out), S-1 or 
- [GET /iban/check](/services/iban-check) ($0.001): Validate an IBAN before you pay: check digits (mod-97), the right length for its country, SEPA membership, and the bank code, branch and account parts (UK: sort
- [GET /vat/calc](/services/vat-calc) ($0.001): Invoice-ready VAT maths: add VAT to net amounts or take it out of gross ones, per line and in total, rounded to the penny the way HMRC allows, with the amounts 

New here? [Getting started in 60 seconds](/start). All services: [Aayat AI](/).