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). HISTORY: pass start_date/end_date or days (and interval=month_end for one row per month) for a dated series of SSE, SZSE and combined financing balances back to 2010-03-31, each row with the balance as a percent of float market value (e.g. ‘A-share margin financing balance, last 6 month-ends’). Source: SSE margin trading figures via Eastmoney per-exchange margin history (keyless) + SZSE margin trading summary (keyless).

Parameters

NameTypeRequiredDescription
symbolstringnoOptional 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.
datestringnoTrading 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.
start_datestringnoHISTORY MODE: first day of a series, YYYY-MM-DD or YYYYMMDD. Returns one dated row per trading day (or per month, see interval) with SSE, SZSE and combined financing balances, ending at end_date.
end_datestringnoHISTORY MODE: last day of the series (default: most recent published day).
daysnumbernoHISTORY MODE alternative to start_date: the most recent N trading days (1-250). With interval month_end, N is a CALENDAR-day window back from end_date (1-7300): days:90 returns the month-ends inside the last 90 days. To count months use months.
monthsnumbernoHISTORY MODE, interval month_end only: the most recent N month-ends (1-240). Ignored for daily.
intervalstringnoHISTORY MODE: “daily” (default; at most 250 rows) or “month_end” (the last published trading day of each calendar month; at most 240 rows).

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.

Regenerated from source · build November 22, 2026