Skip to main content
Glama

A股数据 API (A-Share Data API)

ashare_market_kline

全市场单日K线 —— 一次请求返回某交易日全 A 股(5000+ 只)的日线。用户问'全市场当天行情/一次拿所有股票K线/每日增量更新/全A股数据'用这个。⚠️ 用途:替代「逐只循环 5000 次」——每天收盘后调 1 次即可拿到全市场,适合建本地行情库/做全市场扫描/每日批量更新。⚠️ 两种硬限定:① 仅专业版(¥99)与机构版(¥199) 可用(Standard 及以下会被拒);② 1 次调用折算 500 次额度(一次动 5000+ 只,量级远超单只接口)。⚠️ 另有独立日额度(专业版 200 / 机构版 1000 次/天),余量可查 ashare_usage。⚠️ 数据范围:仅 A 股股票(5572 只)、2016-08-08 起、不复权原始价;不含 ETF/可转债/指数/板块/港股/美股。最新数据到前一交易日(盘中当日数据不可用)。⚠️ 体积约 785 KB/次。字段 8 列:code time open high low close volume amount。

Input Schema

NameRequiredDescriptionDefault
dateYes交易日 YYYY-MM-DD(如 2026-09-30;非交易日返回空)
codesNo可选:只取指定股票,逗号分隔(如 sh600519,sz000001)
limitNo分页:每次最多 N 只(0 = 全部 5000+ 只)
offsetNo分页偏移(配合 limit)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: plan-tier gating (Pro ¥99 / Institutional ¥199 only), a 500-unit quota multiplier per call, a separate daily quota (200/1000) with a pointer to ashare_usage for remaining balance, latest-data cutoff at the previous trading day, unadjusted prices, and ~785 KB payload size. These are exactly the operational constraints an agent needs before invoking.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical constraints (what it does, quota cost, tier gate) are front-loaded and each paragraph earns its place. It leans on heavy bold/emoji markup and the ⚠️ 用途 block partly restates the opening sentence, which is mild redundancy but not padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-cost bulk-fetch tool, the description covers cost, eligibility, data coverage, freshness, and format, and an output schema already exists so return values need no further explanation. An agent has everything required to decide whether to call it and what to expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so date/codes/limit/offset are already documented in the schema; the description adds the important framing that a single call returns the entire market and costs ~785 KB, which motivates the paging parameters when full pulls are too large. It does not add syntax detail beyond the schema, so it stays near the baseline rather than exceeding it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The definition opens with a specific verb+resource+scope: one request returning the daily K-line for all 5000+ A-shares on a given trading day. It immediately differentiates itself from the per-stock pattern it replaces ("替代逐只循环 5000 次"), so an agent can tell this is the bulk whole-market endpoint rather than a single-symbol lookup.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It enumerates concrete user intents that should route here ("全市场当天行情/一次拿所有股票K线/每日增量更新/全A股数据") and states the alternative it supersedes (looping 5000 single calls). It also gives explicit when-not conditions: no ETF/convertibles/index/sector/HK/US, nothing before 2016-08-08, and no intraday/current-day data.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources