# Myworker Agent API – FX Exchange Rate Lookup (fx-kadar)

> Myworker Agent API – FX Exchange Rate Lookup (fx-kadar) is a paid API for AI agents from crypto-micro-agent.mykira.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-23).

Returns current foreign exchange rates from a specified base currency to one or more target currencies, sourced from open.er-api.com.

## Facts

- Endpoint: GET https://crypto-micro-agent.mykira.workers.dev/api/agent/fx-kadar?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/myworker-agent-api-fx-exchange-rate-lookup-fx-kadar-d298cf23
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fWlD0xoNDxsCPUxYB2G__

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 myworker-agent-api-fx-exchange-rate-lookup-fx-kadar-d298cf23
```

Example prompt: What are the current exchange rates from USD to MYR, SGD, and EUR? I need the latest live rates.

## When to prefer this

Choose this endpoint when you need live foreign exchange rates for one or more currency pairs in a pay-per-call model using crypto (USDC on Solana, USDC on Base, or SOL), without requiring an API key subscription. Ideal for agents that infrequently query FX rates and want minimal setup overhead.

## Known failure modes

- Missing required 'dari' (base currency) query parameter returns an error
- Invalid or unsupported 3-letter currency code returns an error or empty rates
- More than 6 target currencies specified may be rejected
- Payment failure (x402) if USDC/SOL payment is not completed correctly
- Upstream open.er-api.com outage may cause stale or missing data

## How this service works

Servis berbayar untuk bot/agen (x402): data pasaran Solana via Jupiter + RPC, dan servis AI via Workers AI. Bayar per panggilan dengan USDC di Solana, USDC di Base, atau SOL.

## Output

A JSON object containing the base currency, a dictionary of target currency codes mapped to their current exchange rates (e.g. EUR: 0.86, MYR: 4.2, SGD: 1.28), the timestamp of the rates, and the data source (open.er-api.com).

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "example": {
      "ke": "myr,sgd,eur",
      "dari": "usd"
     },
     "required": [
      "dari"
     ],
     "properties": {
      "ke": {
       "type": "string",
       "description": "Sasaran kod 3 huruf, dipisah koma (maks 6). Kosong = eur,gbp,sgd,idr."
      },
      "dari": {
       "type": "string",
       "description": "Matawang asas, kod 3 huruf (cth usd). Boleh sertakan sasaran dalam ayat: \"usd myr sgd\"."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "hasil": {
   "asas": "USD",
   "nota": "Nilai kadar untuk 1 USD…",
   "kadar": {
    "EUR": 0.86,
    "MYR": 4.2,
    "SGD": 1.28
   },
   "diemas": "Sat, 18 Oct 2026 00:02:01 +0000",
   "sumber": "open.er-api.com"
  },
  "servis": "fx-kadar"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/myworker-agent-api-fx-exchange-rate-lookup-fx-kadar-d298cf23/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from crypto-micro-agent.mykira.workers.dev](https://www.zero.xyz/host/crypto-micro-agent.mykira.workers.dev/llms.txt)
