ashares_margin_financing
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_margin_financing for the schema, then POST the same URL with its arguments for the data.
The China A-share market’s aggregate margin financing and securities lending balance, from SSE + SZSE.
Tool description as the model sees it
China A-share margin financing and securities lending balance (融资融券余额/两融余额) — the market-wide leverage gauge: aggregate financing balance (融资余额, money borrowed to buy stock), securities-lending balance (融券余额, shares borrowed to short), and their combined total (融资融券余额), for the Shanghai (SSE) and Shenzhen (SZSE) exchanges separately and combined, with day-over-day change. Answers ‘融资余额’, ‘两融余额’, ‘融资融券余额’, ‘margin financing balance’, ‘China A-share margin debt’, ‘how much margin debt is in the A-share market’, ‘margin balance day over day change’. Pass a 6-digit SZSE code (0/3/159-prefixed) in symbol for that stock’s own 融资余额/融券余额/融资融券余额 instead of the market aggregate — SSE (6xxxxx) per-stock detail is not available via any verified keyless route, so a SH code returns a clear not_available message rather than silently substituting. Margin data publishes T+1 (today’s figures appear tomorrow morning); a request for a day with nothing published yet or a non-trading day (weekend/holiday) automatically falls back to the last trading day that published, and says so. Amounts in CNY (converted from each exchange’s native 元/亿元/万元 units and labelled). Source: SSE query.sse.com.cn (keyless) + SZSE www.szse.cn ShowReport CATALOGID=1837_xxpl (keyless).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | no | Optional 6-digit SZSE code (0/3/159-prefixed, e.g. “000001” 平安银行) for that stock’s own margin balance instead of the market-wide aggregate. SSE codes (6xxxxx) are not supported here — no verified keyless per-stock route exists. |
date | string | no | Trading day as YYYY-MM-DD or YYYYMMDD (default: most recent day with published data). Margin data is T+1, so “today” usually has nothing yet. |
Example call
Arguments
{}
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_margin_financing","arguments":{}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('ashares_margin_financing', {});
More examples
{
"symbol": "000001"
}
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.