# China FX Rates API

> China FX Rates API is a paid API for AI agents from china-market-data-api.vercel.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Returns real-time RMB onshore (CNY) and offshore (CNH) exchange rates along with their spread, paid per call via x402 micropayment

## Facts

- Endpoint: GET https://china-market-data-api.vercel.app/v1/china/fx?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/china-fx-rates-api-e6cc0b9f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Diy48O7_pkZsHnH8XaEUI

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 china-fx-rates-api-e6cc0b9f
```

Example prompt: What are the current onshore CNY and offshore CNH rates against the US dollar, and how wide is the spread between them right now?

## When to prefer this

Choose this endpoint when you need real-time RMB onshore/offshore FX data with no signup or API key — just a USDC micropayment. Ideal for AI agents that need fresh CNY/CNH rates and spread on demand without managing credentials. Prefer over general FX APIs when CNY/CNH spread is specifically required.

## Known failure modes

- 402 Payment Required if USDC payment via x402 is missing or insufficient
- Rate data temporarily unavailable if upstream FX feed is delayed
- Malformed response if the source data provider has an outage
- Stale data if the FX feed has not refreshed recently
- Network timeout on Vercel cold start

## How this service works

China market data for AI agents, paid per call in USDC via x402 (HTTP 402). No signup, no API key. Endpoints cover RMB onshore and offshore FX with their spread, Chinese commodity futures main contracts, China equity indices, a Baidu real-time hot-search attention signal, and a one-call cross-asset snapshot. A free /v1/china/sample endpoint returns live samples of every dataset so a client can size the data before paying.

## Output

Returns the current RMB onshore (CNY) and offshore (CNH) exchange rates against a reference currency (typically USD), along with the spread between the two rates and a timestamp indicating data freshness.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/china-fx-rates-api-e6cc0b9f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from china-market-data-api.vercel.app](https://www.zero.xyz/host/china-market-data-api.vercel.app/llms.txt)
