ashares_index_bars

Pack: china-exchange-data · Endpoint: https://gateway.pipeworx.io/china-exchange-data/mcp

上证/深证指数日线周线 — Daily or weekly OHLC + volume + turnover bars for a major China A-share index: 上证指数 Shanghai Composite (000001), 上证50 (000016), 沪深300 CSI 300 (000300), 科创50 STAR50 (000688) from SSE; 深证成指 Shenzhen Component (399001), 创业板指 ChiNext (399006) from SZSE. Answers “上证指数000001最近10个交易日OHLC”, “Shanghai Composite last 10 days”, “深证成指周线”, “ChiNext index history”. Source: SSE yunhq public quote system (000xxx/999xxx indices) + SZSE ssjjhq history API (399xxx indices), both keyless.

Parameters

NameTypeRequiredDescription
indexstringnoIndex code: 000001 (上证指数), 000016 (上证50), 000300 (沪深300), 000688 (科创50), 399001 (深证成指), 399006 (创业板指). Default 000001.
daysnumbernoNumber of daily bars to return, 1-250 (default 10). Ignored if weeks is set.
weeksnumbernoNumber of weekly bars to return, 1-104. Overrides days when set.

Example call

Arguments

{
  "index": "000001",
  "days": 10
}

curl

curl -X POST https://gateway.pipeworx.io/china-exchange-data/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"ashares_index_bars","arguments":{"index":"000001","days":10}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('ashares_index_bars', {
  "index": "000001",
  "days": 10
});

More examples

{
  "index": "399006",
  "weeks": 4
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "china-exchange-data": {
      "url": "https://gateway.pipeworx.io/china-exchange-data/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build September 7, 2026