ashares_sw_industry_history
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_sw_industry_history for the schema, then POST the same URL with its arguments for the data.
Shenwan industry index daily OHLC/change %/amount history for one code, a list, or all level-1; window return computed.
Tool description as the model sees it
Daily HISTORY of Shenwan (\u7533\u4e07) industry indices: dated open, high, low, close, change %, trading amount for one industry code, a list of codes, or all 31 level-1 industries (level=1), trimmed to a window. Answers “\u7533\u4e07\u4e00\u7ea7\u884c\u4e1a\u8fd1120\u4e2a\u4ea4\u6613\u65e5\u6536\u76d8”, “Shenwan industry index closing prices over 60 days”, “which Shenwan industries turned strong over 20/60/120 days”, “801010 \u519c\u6797\u7267\u6e14 historical close”, “SW index relative strength”. Each industry also gets window_return_pct (first to last close, computed). Window: limit most recent trading days (default 60) or start_date/end_date. Multi-industry calls fetch each series separately (slow: allow ~30 s for level=1); any series that fails is listed under failed, never dropped silently. For ONE day across all industries with P/E and P/B use ashares_sw_industries. Source: Shenwan Hongyuan Research, SW industry index publication.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
code | string | no | One 6-digit Shenwan industry code, e.g. “801010” (Agriculture), “801080” (Electronics). |
codes | array | no | List of 6-digit Shenwan codes (max 31). |
items | string | no | |
level | number | no | Pass 1 to fetch all 31 level-1 industries in one call (names from the latest board). |
start_date | string | no | Window start, YYYY-MM-DD or YYYYMMDD. |
end_date | string | no | Window end, YYYY-MM-DD or YYYYMMDD (default: latest). |
limit | number | no | Most recent N trading days within the window, 1-2000 (default 60 when no start_date). |
Example call
Arguments
{
"code": "801010",
"limit": 120
}
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_sw_industry_history","arguments":{"code":"801010","limit":120}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('ashares_sw_industry_history', {
"code": "801010",
"limit": 120
});
More examples
{
"level": 1,
"limit": 20
}
Response shape
| Field | Type | Description |
|---|---|---|
found | boolean | |
data_as_of | string | null | Latest bar date |
window | object | |
industries_returned | number | |
industries | array | One entry per industry |
failed | array | Series that failed to load |
not_found | array | Codes with no published series |
codes | array | Requested codes (found:false) |
message | string | Plain-language explanation (found:false) |
field_notes | object | |
source | string | Publisher and dataset |
Full JSON Schema
{
"type": "object",
"properties": {
"found": {
"type": "boolean"
},
"data_as_of": {
"type": [
"string",
"null"
],
"description": "Latest bar date"
},
"window": {
"type": "object",
"properties": {
"start_date": {
"type": [
"string",
"null"
],
"description": "x"
},
"end_date": {
"type": [
"string",
"null"
],
"description": "x"
},
"limit": {
"type": [
"number",
"null"
],
"description": "x"
}
},
"additionalProperties": true
},
"industries_returned": {
"type": "number"
},
"industries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Shenwan code"
},
"name": {
"type": [
"string",
"null"
],
"description": "Industry name (level=1 only)"
},
"returned": {
"type": "number"
},
"first_date": {
"type": [
"string",
"null"
],
"description": "x"
},
"last_date": {
"type": [
"string",
"null"
],
"description": "x"
},
"window_return_pct": {
"type": [
"number",
"null"
],
"description": "Computed first-to-last close return, percent"
},
"bars": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Trading date YYYY-MM-DD"
},
"open": {
"type": [
"number",
"null"
],
"description": "Open"
},
"high": {
"type": [
"number",
"null"
],
"description": "High"
},
"low": {
"type": [
"number",
"null"
],
"description": "Low"
},
"close": {
"type": [
"number",
"null"
],
"description": "Close"
},
"change_pct": {
"type": [
"number",
"null"
],
"description": "One-day change percent"
},
"trading_amount": {
"type": [
"number",
"null"
],
"description": "Trading amount as published"
}
},
"additionalProperties": true
},
"description": "Dated bars, oldest first"
}
},
"additionalProperties": true
},
"description": "One entry per industry"
},
"failed": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "x"
},
"error": {
"type": "string",
"description": "x"
}
},
"additionalProperties": true
},
"description": "Series that failed to load"
},
"not_found": {
"type": "array",
"items": {
"type": "string",
"description": "code"
},
"description": "Codes with no published series"
},
"codes": {
"type": "array",
"items": {
"type": "string",
"description": "code"
},
"description": "Requested codes (found:false)"
},
"message": {
"type": "string",
"description": "Plain-language explanation (found:false)"
},
"field_notes": {
"type": "object",
"properties": {},
"additionalProperties": true
},
"source": {
"type": "string",
"description": "Publisher and dataset"
}
},
"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.