Skip to main content
Glama

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

ashare_kline

K线(日/周/月/季/年 + 分钟线)。用户问'走势/最近表现/历史K线/趋势'用这个。⚠️ 只要当前价用 ashare_quote;要分时(盘中每分钟价+累计量)用 ashare_minute ——分钟 K 线(OHLC 蜡烛)用本工具的 period=m1/m5/...,两者不是一回事。⚠️ 换手率字段名是 turnover(%)—— 与 ashare_quote、ashare_snapshot 同名同值。⚠️ 复权口径由服务端固定(无 adjust 参数):日线及以上前复权(除权除息日不跳空),分钟线不复权 —— 不要再自己复权(会二次复权)。⚠️ 分钟线属付费层(日/周/月免费),必须同时传 start+end(窗口近 1 个月),不支持 北交所 / 期货 / 外汇。只读查询;按收盘更新。· 免费工具(无需 Key)· 分钟线除外

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo结束日期 YYYY-MM-DD(仅 day 与分钟线;须与 start 配对;分钟线必填)
codeYes股票代码:sh600667
countNo条数(默认 30,最大 1212)
startNo起始日期 YYYY-MM-DD(仅 day 与分钟线;须与 end 配对;分钟线必填)
periodNo周期:day / week / month / season / year / m1 / m5 / m15 / m30 / m60 / m120(默认 day)day

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / count / description
      Previous value: -"条数(默认 30)"New value: +"条数(默认 30,最大 1212)"
    • addedInput schema / properties / end
      Added value: +{
      +  "default": "",
      +  "description": "结束日期 YYYY-MM-DD(仅 day 与分钟线;须与 start 配对;分钟线必填)",
      +  "title": "End",
      +  "type": "string"
      +}
    • changedInput schema / properties / period / description
      Previous value: -"周期:day / week / month(默认 day)"New value: +"周期:day / week / month / season / year / m1 / m5 / m15 / m30 / m60 / m120(默认 day)"
    • addedInput schema / properties / start
      Added value: +{
      +  "default": "",
      +  "description": "起始日期 YYYY-MM-DD(仅 day 与分钟线;须与 end 配对;分钟线必填)",
      +  "title": "Start",
      +  "type": "string"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / code / description
      Added value: +"股票代码:sh600667"
    • addedInput schema / properties / count / description
      Added value: +"条数(默认 30)"
    • addedInput schema / properties / period / description
      Added value: +"周期:day / week / month(默认 day)"
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so richly: it discloses the server-fixed 复权 policy (day+ = 前复权, minute = 不复权, and warns against double-adjusting), that minute lines are a paid tier requiring start+end within a ~1-month window, unsupported markets (北交所/期货/外汇), read-only nature, and close-based update cadence.

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?

Purpose and routing are front-loaded, followed by caveat bullets that each carry distinct, non-redundant information. It is long, but the density is justified by the number of real traps (adjustment, tier gating, sibling disambiguation) it prevents.

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?

Given five parameters, an output schema (so return format needn't be described), and no annotations, the description covers everything an agent needs: routing, adjustment semantics, tier/pairing constraints, and unsupported scope. Nothing material is missing.

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 the baseline is 3, but the description adds real value beyond the schema: the turnover field name mapping (turnover, shared with ashare_quote/ashare_snapshot), the absence of an adjust parameter, and the start+end pairing requirement for minute lines. It stops short of explaining count/period interaction, so not a 5.

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?

States a specific resource (K线) with its scope (日/周/月/季/年 + 分钟线) and a clear trigger verb set ('走势/最近表现/历史K线/趋势'). It explicitly distinguishes itself from siblings ashare_quote (current price) and ashare_minute (分时), including the subtle 分钟K线 vs 分时 distinction, so an agent can route without opening any schema.

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?

Gives explicit when-to-use triggers and explicit when-not-to-use with named alternatives: current price → ashare_quote, 分时 → ashare_minute. Also states the period=m1/m5 route for minute candles. Nothing is left to inference.

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