# CN Data - China A-Share Fund Flow

> CN Data - China A-Share Fund Flow is a paid API for AI agents from cn-data-x402.cn-data-x402-worker.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-16).

Returns ranked fund-flow data (主力净流入/流出) for Chinese A-share market segments — by industry sector, concept theme, region, or individual stock — sourced from Eastmoney.

## Facts

- Endpoint: GET https://cn-data-x402.cn-data-x402-worker.workers.dev/cn/fundflow?utm_source=zero.xyz
- Price: $0.02/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-china-a-share-fund-flow-4573652c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XLUiUGl5jFSv3c5ZJyfgO

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-china-a-share-fund-flow-4573652c
```

Example prompt: Show me the top 20 Chinese A-share industry sectors ranked by main force net inflow today — I want to see which industries are attracting the most capital right now.

## When to prefer this

Use this endpoint when you need structured, machine-readable Chinese A-share fund flow data broken down by sector, concept, region, or individual stock — especially when Eastmoney's web interface is the only source and you need clean JSON. Prefer this over scraping Eastmoney directly (no parsing needed) and over generic financial data APIs that don't cover Chinese-language market microstructure data. Ideal for agents that need to rank sectors by institutional capital flows without requiring an API key or registration.

## Known failure modes

- HTTP 402 returned on first call — agent must pay $0.02 USDC on Base and retry
- Invalid 'type' value returns error or empty result
- Invalid 'direction' value (not 'in' or 'out') returns error
- limit out of range 1-100 may return validation error
- Market closed or off-hours may return stale or cached data
- Network timeout from Cloudflare Worker if Eastmoney upstream is slow

## 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

Returns a JSON object with ok:true and a data object containing: segment type label, flow direction, total items available, the number returned, source attribution (Eastmoney push2), and an items array. Each item includes the sector/stock code, name, ranking position, main net flow in yuan and as a percent, super-large/large/medium/small net flows in yuan, price change percent, and the leading stock in that sector (code + name).

## 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",
     "properties": {
      "type": {
       "type": "string",
       "description": "类型：industry（行业，默认）/ concept（概念）/ region（地域）/ stock（沪深A股）"
      },
      "limit": {
       "type": "integer",
       "description": "返回条数 1-100，默认 20"
      },
      "direction": {
       "type": "string",
       "description": "in（主力净流入，默认）/ out（主力净流出）"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "type": "industry",
   "items": [
    {
     "code": "BK1033",
     "name": "电池",
     "rank": 1,
     "leader": {
      "code": "300750",
      "name": "宁德时代"
     },
     "mainNetYuan": 1037502032,
     "largeNetYuan": 569039616,
     "smallNetYuan": -473195008,
     "changePercent": 0.46,
     "mediumNetYuan": -549459968,
     "mainNetPercent": 2.99,
     "superLargeNetYuan": 468462416
    }
   ],
   "source": "东方财富 资金流向（push2）",
   "returned": 1,
   "typeName": "行业板块",
   "direction": "in",
   "totalItems": 496
  },
  "endpoint": "/cn/fundflow"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cn-data-china-a-share-fund-flow-4573652c/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)
