ashares_sector_capital_flow_window
Pack: china-stocks · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/ashares_sector_capital_flow_window for the schema, then POST the same URL with its arguments for the data.
China A-share industry sectors ranked by main-capital net inflow over 3, 5 or 10 trading days, with consecutive inflow/outflow day counts.
Tool description as the model sees it
China A-share INDUSTRY-SECTOR main-capital net inflow summed over the last N trading days (default 5; use 3, 5 or 10), with how many days in a row each sector has had net inflow or outflow. Answers ‘最近5日行业主力资金净流入排名’, ‘板块连续3日净流入’, ‘连续流入天数’, ‘which sectors had the most main-capital net inflow over the last 10 trading days’, ‘sectors with net inflow for 3 days running’, ‘sector fund flow 5-day ranking’. Per sector: summed main net inflow (主力净流入) and its order-size split (超大单/大单/中单/小单) in CNY, inflow and outflow day counts, the current consecutive inflow or outflow streak, cumulative change %, and the day-by-day net inflow. Rank with sort (summed inflow, streak length, cumulative change, inflow days) and filter one sector with sector (name fragment or board code). Eastmoney industry boards (行业板块), roughly 128 sectors, history from 2021-11; not the Shenwan classification. For a single day use ashares_sector_capital_flow. Source: Eastmoney datacenter (keyless).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
days | number | no | Window length in trading days, 1-20 (default 5; 3, 5 and 10 are the common asks). |
end_date | string | no | Last day of the window, YYYY-MM-DD or YYYYMMDD (default: most recent day with published data). |
sort | string | no | Rank by summed net inflow (default), current consecutive inflow streak, cumulative change %, or number of inflow days. |
order | string | no | desc (default, largest first) or asc (largest net outflow / shortest streak first). |
sector | string | no | Only sectors whose name contains this text (e.g. “半导体”) or whose board code equals it (e.g. “BK1036”). |
limit | number | no | How many sectors to return, 1-130 (default 20). |
Example call
Arguments
{
"days": 10,
"limit": 3
}
curl
curl -X POST https://gateway.pipeworx.io/china-stocks/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"ashares_sector_capital_flow_window","arguments":{"days":10,"limit":3}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('ashares_sector_capital_flow_window', {
"days": 10,
"limit": 3
});
More examples
{
"days": 5,
"sector": "半导体",
"limit": 1
}
Response shape
| Field | Type | Description |
|---|---|---|
found | boolean | false only when no data was published in range |
message | string | Why nothing was found, when found is false |
window_trading_days | number | Trading days actually covered by the window |
requested_days | number | Window length asked for |
window_note | string | null | Set when the window is shorter than requested |
dates_oldest_first | array | Trading dates in the window, oldest first |
end_date | string | Last trading day in the window, YYYY-MM-DD |
data_as_of | string | Same as end_date |
sort | string | Ranking column used |
order | string | desc or asc |
total_sectors | number | Sectors with data in the window before the limit |
returned | number | Sectors returned |
note | string | How the figures are defined |
source | string | Publisher and dataset |
sectors | array | Ranked sectors |
Full JSON Schema
{
"type": "object",
"properties": {
"found": {
"type": "boolean",
"description": "false only when no data was published in range"
},
"message": {
"type": "string",
"description": "Why nothing was found, when found is false"
},
"window_trading_days": {
"type": "number",
"description": "Trading days actually covered by the window"
},
"requested_days": {
"type": "number",
"description": "Window length asked for"
},
"window_note": {
"type": [
"string",
"null"
],
"description": "Set when the window is shorter than requested"
},
"dates_oldest_first": {
"type": "array",
"items": {
"type": "string"
},
"description": "Trading dates in the window, oldest first"
},
"end_date": {
"type": "string",
"description": "Last trading day in the window, YYYY-MM-DD"
},
"data_as_of": {
"type": "string",
"description": "Same as end_date"
},
"sort": {
"type": "string",
"description": "Ranking column used"
},
"order": {
"type": "string",
"description": "desc or asc"
},
"total_sectors": {
"type": "number",
"description": "Sectors with data in the window before the limit"
},
"returned": {
"type": "number",
"description": "Sectors returned"
},
"note": {
"type": "string",
"description": "How the figures are defined"
},
"source": {
"type": "string",
"description": "Publisher and dataset"
},
"sectors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"board_code": {
"type": [
"string",
"null"
],
"description": "Eastmoney board code"
},
"industry": {
"type": [
"string",
"null"
],
"description": "Industry board name"
},
"days_with_data": {
"type": "number",
"description": "Days in the window with a published value"
},
"net_inflow_sum_cny": {
"type": "number",
"description": "Summed main-capital net inflow in CNY"
},
"super_large_net_inflow_sum_cny": {
"type": "number",
"description": "Summed super-large order net inflow in CNY"
},
"large_net_inflow_sum_cny": {
"type": "number",
"description": "Summed large order net inflow in CNY"
},
"medium_net_inflow_sum_cny": {
"type": "number",
"description": "Summed medium order net inflow in CNY"
},
"small_net_inflow_sum_cny": {
"type": "number",
"description": "Summed small order net inflow in CNY"
},
"inflow_days": {
"type": "number",
"description": "Days with net inflow"
},
"outflow_days": {
"type": "number",
"description": "Days with net outflow"
},
"consecutive_inflow_days": {
"type": "number",
"description": "Inflow streak ending on the last day"
},
"consecutive_outflow_days": {
"type": "number",
"description": "Outflow streak ending on the last day"
},
"cumulative_change_pct": {
"type": [
"number",
"null"
],
"description": "Compounded daily change over the window"
},
"daily_net_inflow_cny": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Trading date"
},
"net_inflow_cny": {
"type": [
"number",
"null"
],
"description": "Main-capital net inflow that day in CNY"
}
},
"additionalProperties": true
},
"description": "Day-by-day net inflow, oldest first"
}
},
"additionalProperties": true
},
"description": "Ranked sectors"
}
},
"additionalProperties": true
}
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the china-stocks pack
{
"mcpServers": {
"china-stocks": {
"url": "https://gateway.pipeworx.io/china-stocks/mcp"
}
}
}
See Getting Started for client-specific install steps.