# CN Data FX Rates

> CN Data FX Rates is a paid API for AI agents from cn-data-x402.cn-data-x402-worker.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-16).

Returns official CNY foreign exchange rates (USD, EUR, HKD, JPY, and more) as machine-readable JSON, sourced from Chinese financial data.

## Facts

- Endpoint: GET https://cn-data-x402.cn-data-x402-worker.workers.dev/cn/fx?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cn-data-fx-rates-36e5ef47
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VWylT7JcDShYvFRu13WFc

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 cn-data-fx-rates-36e5ef47
```

Example prompt: What are the latest official CNY exchange rates against USD, EUR, HKD, and JPY from Chinese market data?

## When to prefer this

Choose this endpoint when you need CNY exchange rates sourced specifically from Chinese market/official data, returned as clean structured JSON without requiring API key registration. Ideal for agents needing RMB conversion rates on demand with micro-payment access rather than a subscription. Prefer over generic FX APIs when the user explicitly needs China-side official rates rather than interbank mid-market rates from Western providers.

## Known failure modes

- HTTP 402 returned before payment is made — must pay listed USDC amount on Base and retry
- Stale rates if the upstream Chinese data source has not refreshed — check updatedAt timestamp
- Currency codes not in the foreignToCny map if the source does not publish them
- Network or worker errors returning non-JSON responses

## How this service works

Chinese market and China-focused public data over the x402 protocol. No API key and no signup: call any endpoint, receive HTTP 402 with payment terms, pay the listed amount in USDC on Base and retry. Every response is JSON. Some Chinese-language sources are published only as web pages — these endpoints return them as clean, machine-readable JSON.

## Output

A JSON object with an 'ok' status flag, a 'data' object containing an 'updatedAt' RFC-2822 timestamp and a 'foreignToCny' map of currency codes (e.g. EUR, HKD, JPY, USD) to their CNY exchange rates as decimal numbers, and the endpoint path.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "updatedAt": "Thu, 01 Oct 2026 00:00:01 +0000",
   "foreignToCny": {
    "EUR": 7.8612,
    "HKD": 0.8642,
    "JPY": 0.0451,
    "USD": 6.7169
   }
  },
  "endpoint": "/cn/fx"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cn-data-fx-rates-36e5ef47/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cn-data-x402.cn-data-x402-worker.workers.dev](https://www.zero.xyz/host/cn-data-x402.cn-data-x402-worker.workers.dev/llms.txt)
