china-market-data

china-market-data is a skill for Claude Code from cyijun/china-financial-services. It costs 106 tokens per session (1,399 once invoked), scanned A, original, Apache-2.0.

A routing and quality-check process for obtaining Chinese stock-market and company-financial data from sources such as Tushare Pro and AKShare.

In plain words
What is it for?
It helps select data interfaces, retrieve and paginate records, check dates and duplicates, preserve source details, and flag incomplete or unsuitable data for research and backtesting.
Why use it?
It prevents researchers from choosing a convenient data source that cannot support the required date, completeness, or historical point-in-time rules.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the china-market-researcher plugin — 17 skills, 1 agent shipped together

Good fit It helps select data interfaces, retrieve and paginate records, check dates and duplicates, preserve source details, and flag incomplete or unsuitable data for research and backtesting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cyijun/china-financial-services/china-market-data
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cyijun/china-financial-services --skill china-market-data
Clone the repo
git clone --depth 1 https://github.com/cyijun/china-financial-services

Made for: Claude Code.

Or install china-market-researcher, the plugin that ships this one along with the rest of its 17 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for china-market-data

README.md
[![agentmods](https://agentmods.dev/badge/skills/cyijun/china-financial-services/china-market-data/github.svg)](https://agentmods.dev/skills/cyijun/china-financial-services/china-market-data)
Your own site
<a href="https://agentmods.dev/skills/cyijun/china-financial-services/china-market-data"><img src="https://agentmods.dev/badge/skills/cyijun/china-financial-services/china-market-data/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for china-market-data

Your own site · 80×15
<a href="https://agentmods.dev/skills/cyijun/china-financial-services/china-market-data"><img src="https://agentmods.dev/badge/skills/cyijun/china-financial-services/china-market-data.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,399 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00106 $0.01399
Opus 5 $0.00053 $0.00700
Sonnet 5 $0.00021 $0.00280
Haiku 4.5 $0.00011 $0.00140

Measured 12d ago against content hash eaac53b6a471, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

china-market-data scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/china_market_data.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/china-market-researcher/skills/china-market-data/SKILL.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

中国市场数据路由

先确定研究问题和可得时点要求,再选择数据接口。不要从“哪个接口方便”倒推研究口径。

数据源策略

  1. 法定披露与交易所原文是高影响事实的最终依据。
  2. Tushare Pro 是结构化主源。本项目按6000积分规划,但每次真实任务仍以运行时返回的权限为准。
  3. AKShare 是补充源,适合公开网页行情、当前股票/行业列表和交叉核对;其上游网页、字段和可用性可能变化。
  4. MockProvider 只用于显式离线测试,绝不能作为生产自动降级。

工作流

  1. 把请求规范化为数据集、标的、期间、字段、as_of、是否严格PIT及预期行数。
  2. 读取 references/provider-matrix.md 选择主接口与备选接口;涉及历史研究或回测时同时读取 references/point-in-time-contract.md。涉及中国国债曲线、宏观期限结构或DCF无风险利率时读取 references/china-yield-curve.md
  3. 先调用Tushare。跨全市场财务截面在6000积分规划下使用 income_vipbalancesheet_vipcashflow_vipfina_indicator_vipforecast_vipexpress_vip
  4. 只有主源发生依赖、网络、权限、限流或服务错误时才考虑AKShare;参数、schema和代码错误不得触发降级,主源返回空表也不自动等于失败。
  5. 若请求 require_pit=true,备用接口没有公告可得时点或历史成员区间时必须停止,不得静默降级。
  6. 清洗后执行schema、主键、日期、数值、非负、重复、版本、空值和行数检查。完整抽取优先显式设置paginate=true;达到接口上限但未证明分页完成时标记partialrequire_complete=true则失败关闭。
  7. 输出数据及元信息:provider、interface、原始请求、实际接口参数、抓取时间、as_of、PIT等级、过滤行数、分页完成度、响应SHA-256、权限是否真实验证和降级链。

中国市场不变量

  • 财务报表按 ann_date / f_ann_date 或可核验实际披露时间生效。只有日期无时刻时,路由器保守地从上海时区次日00:00起可用;这仍不能证明完整修订历史。
  • disclosure_date 是披露计划,不等于实际发布时刻。
  • 回测用价格默认取不复权日线和复权因子分别保存;不得用今天计算的前复权序列污染历史决策。
  • 历史股票池必须处理上市/退市/过会未发行状态、ST、停牌、涨跌停、指数/行业成分进出和920xxx.BJ等北交所代码。
  • 历史基金池同时获取fund_basic的L/D/I状态并按上市/摘牌区间过滤;摘牌日按区间终点含当日处理。ETF日线与基金净值不得混用,净值按ann_date而非仅nav_date进入严格PIT研究。fund_share.trade_date只有份额变动日、没有官方日内发布时间,不能单独满足严格PIT。
  • Tushare的同花顺板块接口在当前文档中要求6000积分,但版权与商业使用边界仍需遵守。
  • AKShare财务报表若没有可靠公告日期,只能用于当前研究或交叉核对,不能进入严格PIT回测。
  • china_yield_curve必须显式指定curve_type=0(到期)或curve_type=1(即期)。数据层的yield单位固定为百分数;DCF的risk_free_rate固定为小数,两者之间必须有可核验的除以100换算。

脚本

scripts/china_market_data.py 提供:

  • capabilities:输出6000积分规划矩阵,不访问网络;
  • fetch:显式选择 tushareakshareautomock
  • adjust:只用截止as_of已存在的不复权行情和复权因子构造qfq/hfq序列,未来因子不会改变历史输出;
  • Tushare优先、AKShare有条件降级;
  • 日期或ISO-8601时刻级as_of过滤、Token进程内读取、显式limit/offset分页、schema/单位契约、质量门禁、截断检测和可审计元数据。

Read the full file on GitHub · 57 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 57 lines · 106 tokens per session scan A eaac53b6a471

Subscribe to this mod's changes

china-market-data is a skill published in the GitHub repository cyijun/china-financial-services (19 stars, last pushed 18d ago), licensed Apache-2.0. It adds 106 tokens to every session and 1,399 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.