# FX Rate Lookup via CoinGecko

> FX Rate Lookup via CoinGecko is a paid API for AI agents from apiwitchcraft.duckdns.org, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Returns the foreign exchange (FX) rate between two currencies using CoinGecko as the underlying data source.

## Facts

- Endpoint: GET https://apiwitchcraft.duckdns.org/fx
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fx-rate-lookup-via-coingecko-539df448
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_86mIdOwIU1gg7hZBfpeH9

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 fx-rate-lookup-via-coingecko-539df448
```

Example prompt: What's the current exchange rate from USD to EUR?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call FX rate lookup between two currencies without a subscription, especially in agentic workflows needing live forex data at low cost. Prefer over free tiers when you need reliable, on-demand access without rate limit concerns.

## Known failure modes

- Missing 'from' or 'to' query parameters returns an error
- Unsupported or invalid currency codes return an error
- CoinGecko upstream unavailability may cause failures or stale data
- Rate limiting from the underlying CoinGecko API may cause intermittent failures

## How this service works

Get live and historical foreign-exchange rates for 150+ currency pairs including spot, mid, and cross rates in a single x402 call. Convert exact amounts for cross-border settlement, treasury, and dynamic pricing in AI-agent and payment workflows. Mirrors institutional mid-market data with timestamped rates. Pay per quote in USDC on Base, no API key, instant JSON.

## Output

Returns the live FX rate between the specified source and target currency pair, sourced from CoinGecko, as a numeric exchange rate value.

## 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"
      },
      "from": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fx-rate-lookup-via-coingecko-539df448/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from apiwitchcraft.duckdns.org](https://www.zero.xyz/host/apiwitchcraft.duckdns.org/llms.txt)
