原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。使用 Google 登录即可撰写评价。原型 · 每 30 分钟更新
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

a-stock-data Skill

作者:simonlin1212★ 11,8471 个 skill

安装

What it does

A股全栈数据工具包:行情K线·当日逐笔·研报·信号·资金面·新闻·财务·公告·打板·ETF期权·舆情·宏观利率·期货大宗(含大商所日K)·事件驱动·可转债 | 15层·87端点·34数据源·除iwencai外免Key | A-share data for AI agents: K-lines, ticks, reports, fund flow, news, financials, filings, options, macro, futures, events, convertibles | 15 layers·87 endpoints·34 sources

  • Connects Instruction files the AI reads; connects to nothing
  • Account or key No key needed
  • Category 写代码
给作者:在 README 中加徽章

如果你是作者,可把这段代码贴到 README。徽章会链接回本页。

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/skill/simonlin1212-a-stock-data.svg)](https://mcp.popnx.com/en/skills/simonlin1212-a-stock-data)

可搭配使用

在同一工作中把 AI 连到服务的 MCP

REA

Reverse engineer anything from your terminal or agent with one CLI and MCP server.

作者:morluto广泛使用↓ 38.9万/周★ 46.2万4天前更新

MCP · 连接服务在你的电脑上运行

Fallow

Codebase intelligence for TypeScript and JavaScript, exposed as structured MCP analysis tools.

作者:fallow-rs广泛使用↓ 244.1万/周★ 5368昨天更新

MCP · 连接服务在你的电脑上运行

Desktop Commander

MCP server for terminal commands, file operations, and process management

作者:wonderwhy-er广泛使用↓ 74万/周★ 1万4天前更新

MCP · 连接服务在你的电脑上运行

相似的 Skill

同类工作,排序与 Skill 列表相同

与相似项目对比
本项
a-stock-data
reagraphifyarchifysecurity-audit-skill
作者simonlin1212morlutoGraphify-Labstt-a1icloudflare
Skill 数11111
GitHub 星标11,847461,751148,35296,75773,156
最近代码更新2026年11月4日2026年11月16日2026年11月16日2026年11月15日2026年9月15日
许可证Apache-2.0MITApache-2.0Apache-2.0MIT

simonlin1212 提供的 1 个 Skill(指令集),AI 读取后照做 · 不是 MCP server

Skill 和 MCP 有什么不同

MCP = 手

把 AI 连到外部服务或数据,例如读取 Notion 或开发票。需要有程序或服务器在运行。

Skill = 手册

教 AI 怎么做某项工作的文本文件,不连接任何服务。

有些会重叠:少数 Skill 带有调用工具的脚本,少数 MCP 只提供知识。请从你想完成的工作出发。

适用的应用

Claude CodeCodex

依据开发者 README 和 repo 中的文件夹

安装

Is it safe?

  • Who made it

    GitHub account simonlin1212 (person), 2 years old

  • Use and upkeep

    ★ 11,847 stars · code last changed 2026年11月4日

  • Any scripts?

    15 scripts that can run on a computer: tests/fixtures/sina_adjust/sh511010-hfq.js, tests/fixtures/sina_adjust/sh511010-qfq.js, tests/fixtures/sina_adjust/sh513100-hfq.js, tests/fixtures/sina_adjust/sh513100-qfq.js and 11 more

  • Uses the internet?

    Scripts that go online: tests/test_valuation.py, tests/test_v37_adjust_factor.py, tests/test_v310_sources.py, tests/test_v39_sources.py

  • Changes machine-wide settings?

    No hooks or writes to machine settings found

Checked automatically from the repo files at commit f215349 (read only, nothing was run). Not a safety guarantee: read it and decide for yourself

第一步:你用哪个 AI?

选择你用的应用,本页只显示该应用的安装方法

Option 1Upload to claude.ai (web and app)

Uploading to claude.ai would fail: SKILL.md has no name or description in its header. Use "Let the AI install it" instead

Option 1让 Claude Code 帮你安装

复制这句话,粘贴到 Claude Code 的对话中

Where to install
Please install the skill a-stock-data from https://github.com/simonlin1212/a-stock-data (commit f215349) for all my projects, at ~/.claude/skills/a-stock-data. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill a-stock-data from https://github.com/simonlin1212/a-stock-data (commit f215349) into the project this chat is open in (at .claude/skills/a-stock-data). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

重新打开 Claude Code,输入 /a-stock-data,或直接提出相关任务,Claude 会自动选用

Checked against official docs 2026年11月12日 · Source: code.claude.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.claude/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/simonlin1212/a-stock-data.git /tmp/popnx-skill-simonlin1212-a-stock-data-f215349 && mkdir -p ~/.claude/skills && cp -R '/tmp/popnx-skill-simonlin1212-a-stock-data-f215349/.' ~/.claude/skills/a-stock-data
  3. 重新打开 Claude Code,输入 /a-stock-data,或直接提出相关任务,Claude 会自动选用

自己安装的 Skill 可用于 ChatGPT 桌面应用、Codex CLI 和 IDE 中的 Codex 扩展 · 网页版和手机版 ChatGPT 不能使用自己安装的 Skill,只能使用目录中插件自带的 Skill

ChatGPT 桌面应用

ChatGPT 桌面应用内置 Codex,Codex 从 ~/.agents/skills 文件夹读取 Skill

Option 1让 ChatGPT 帮你安装

在 ChatGPT 桌面应用中打开 Codex,把这句话粘贴到对话中

Where to install
Please install the skill a-stock-data from https://github.com/simonlin1212/a-stock-data (commit f215349) for all my projects, at ~/.agents/skills/a-stock-data. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill a-stock-data from https://github.com/simonlin1212/a-stock-data (commit f215349) into the project this chat is open in (at .agents/skills/a-stock-data). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Option 2自己放入文件夹

把 a-stock-data 文件夹放到 ~/.agents/skills/a-stock-data

~ 是你的主文件夹($HOME)

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.agents/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/simonlin1212/a-stock-data.git /tmp/popnx-skill-simonlin1212-a-stock-data-f215349 && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-simonlin1212-a-stock-data-f215349/.' ~/.agents/skills/a-stock-data

安装之后

  • ChatGPT 桌面应用:打开侧边栏中的 Skills,确认 Skill 已出现
  • 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称
  • Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

网页版和手机版 ChatGPT

不能使用你自己安装的 Skill,只能使用目录中插件自带的 Skill

想在 ChatGPT 中使用这个 Skill,请按上面的方法使用 ChatGPT 桌面应用

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

Option 1让 Codex 帮你安装

复制这句话,粘贴到 Codex 的对话中 · 适用于 ChatGPT 桌面应用中的 Codex、Codex CLI 和 IDE 扩展

Where to install
Please install the skill a-stock-data from https://github.com/simonlin1212/a-stock-data (commit f215349) for all my projects, at ~/.agents/skills/a-stock-data. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill a-stock-data from https://github.com/simonlin1212/a-stock-data (commit f215349) into the project this chat is open in (at .agents/skills/a-stock-data). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex · 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称

Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.agents/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/simonlin1212/a-stock-data.git /tmp/popnx-skill-simonlin1212-a-stock-data-f215349 && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-simonlin1212-a-stock-data-f215349/.' ~/.agents/skills/a-stock-data
  3. 重新打开 Codex 并提出相关任务,Codex 会列出这个 skill

Option 1让 Cursor 帮你安装

复制这句话,粘贴到 Cursor 的对话中

Where to install
Please install the skill a-stock-data from https://github.com/simonlin1212/a-stock-data (commit f215349) for all my projects, at ~/.cursor/skills/a-stock-data. First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill a-stock-data from https://github.com/simonlin1212/a-stock-data (commit f215349) into the project this chat is open in (at .cursor/skills/a-stock-data). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

在 Cursor 的 Agent 聊天中输入 / 并选择 a-stock-data

Checked against official docs 2026年11月12日 · Source: cursor.com

For Terminal users

Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。

  1. 打开终端

    Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”

  2. 把 skill 文件夹复制到 ~/.cursor/skills

    这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹

    git clone --depth 1 https://github.com/simonlin1212/a-stock-data.git /tmp/popnx-skill-simonlin1212-a-stock-data-f215349 && mkdir -p ~/.cursor/skills && cp -R '/tmp/popnx-skill-simonlin1212-a-stock-data-f215349/.' ~/.cursor/skills/a-stock-data
  3. 在 Cursor 的 Agent 聊天中输入 / 并选择 a-stock-data

Option 1Let the AI install it

适用于其他能读取 Skill 的应用。这句话列出了 Claude Code、Codex 和 Cursor 的路径,AI 会按你的应用选择 · Copy this sentence into the app’s chat

Where to install
Please install the skill a-stock-data from https://github.com/simonlin1212/a-stock-data (commit f215349) for all my projects, at ~/.claude/skills/a-stock-data (in Codex use ~/.agents/skills/a-stock-data, in Cursor ~/.cursor/skills/a-stock-data). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the full path you will install to and wait for me to agree.
Please install the skill a-stock-data from https://github.com/simonlin1212/a-stock-data (commit f215349) into the project this chat is open in (at .claude/skills/a-stock-data; in Codex use .agents/skills/a-stock-data, in Cursor .cursor/skills/a-stock-data). First show me every file and tell me whether it has scripts or changes machine settings, then tell me the project name and the full path you will install to and wait for me to agree.

For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing

The AI tells you what it will do first and asks your permission at every step

Checked against official docs 2026年11月12日 · Source: code.claude.com, learn.chatgpt.com, cursor.com

For Terminal users

其他支持 Agent Skills 的应用(如 Gemini CLI、GitHub Copilot)使用不同文件夹,请查看该应用的指南,再把含 SKILL.md 的文件夹复制过去。

在 GitHub 上查看 ↗

已于 2026年11月11日 对照 Claude Code、Codex 和 Cursor 官方指南核实 skill 文件夹

✓ 命令已检查 2026年11月16日

查看原始 SKILL.md

以下文字来自开发者的 repo,不是 PopNx MCP 的指令

显示前 8,000 个字符 · 在 GitHub 打开完整文件

---
name: a-stock-data
description: 当任务需要写代码实际获取A股及相关市场数据时使用——行情/K线/逐笔(腾讯日周月前后复权+分钟线+当日逐笔、通达信官网全市场盘后包、百度)、研报(东财+新浪+同花顺+iwencai)、信号(热点/北向/龙虎榜/解禁/行业/板块资金流)、资金面(融资融券/大宗/股东户数/分红/资金流/ETF份额)、新闻(财联社/东财/华尔街见闻/新闻联播)、财务三表/F10/估值历史/ST名单、公告(巨潮)、打板(涨停池/连板/炸板率/监控池/异动)、ETF期权、舆情互动(互动易/上证e互动/热榜)、筹码分布、复权因子、申万行业变迁、宏观与利率(社融/PMI/中债收益率曲线/回购定盘利率/LPR/全球宏观日历)、指数成分/权重/估值/交易日历、期货与大宗商品(五家期货交易所日行情/商品与股指期权/持仓排名/期货日K含大商所/实时期货/A50/上海金)、事件驱动(业绩预告/机构调研/增减持/回购/股权质押/新股申购)、可转债等真实数据。十五层·87端点(含5备胎)·34个来源·内嵌全部可运行代码,自包含零外部文件;优先用腾讯/交易所官方等不封IP源,东财接口已内置限流防封,主源被封可查「备用源速查」降级。仅在需要调用数据接口取数时使用:A股概念解释、投资观点讨论、策略问答等无需取数的话题不要加载本skill。
origin: custom
version: 3.10.4
---

> 📦 项目主页:https://github.com/simonlin1212/a-stock-data — 更新、反馈、支持作者
> 
> 作者:Simon 林 · X [@linsizhen](https://x.com/linsizhen) · 邮箱:simonlin0423@gmail.com

# A股全栈数据工具包 V3.10.4

十五层数据架构,87 个能力端点(82 主端点 + 5 备胎)、34 个来源。V3.10 新增的 2 个入口于 2026-09-22 实测,V3.9 新增的 25 个入口于 2026-09-20 实测;旧端点的验证日期见各章节。覆盖主板/创业板/科创板/ST,北交所覆盖依端点而异;已有备胎的数据可按「备用源速查」降级。

> **V3.10.4(基金复权修复,2026-11-04 · #64):** 入口数、来源数不变,个股的返回值不变。§1.6 `sina_adjust_factor()` / `apply_adjust()`:
> 基金(ETF / LOF)原来只读新浪的 `f`(基金恒为 1),复权等于没做;现在补读 `s`(累计份额折算比例)和 `u`(累计每份分红),
> 前复权 `raw / s - u`、后复权 `(raw + u) * s`,因子多出 `split` / `dividend`,结果多出 `adj_split` / `adj_dividend`。

> **V3.10.3(上证e互动时间列修复,2026-10-23):** 入口数、来源数不变,返回的数据也不变。§10.3 `sse_e_interaction()`:
> 站点 1 天内的回复时间写成「昨天 18:22」,原来只认绝对时间,遇到就整页抛 `RuntimeError`;现在相对 / 绝对写法都换算成
> `YYYY-MM-DD HH:MM`(相对时间按北京时间),认不出仍然报错。

> **V3.10.2(PE 消化年数修正,2026-10-11 · #58):** 入口数、来源数不变。`full_valuation()` 的 `digest_years`:
> 前向 PE 高于 30x 而下一年预测缺失或盈利不增长、或当年 EPS 缺失 / 不为正时,原来返回 `0`(像是已经消化完),现在返回 `None`;其余情况不变。

> **V3.10.1(成交量单位与对账口径更正 · 逐笔提速与盘后核对,2026-10-07 · #57):** 入口数、来源数不变,返回的数据不变。
> - §1.2 `tencent_kline()` 的 `volume`:**科创板(688 / 689)是股**,其余是手;此前文档全写成「手」,按此换算科创板会大 100 倍。
>   备用源速查里「成交额 = 量(手) × 100 × 均价」同样更正。
> - §1.2 补成交量对账口径:科创板以外日线是整手、最近一个交易日的分钟量也是整手(下一个交易日才回填成精确股数);
>   1 分钟线 09:30 那根只有集合竞价、13:01 开盘价是上午收盘价;深市整分时刻的成交腾讯与 Baostock 分在相邻两根;无成交分钟:第一笔成交以前沪深都没有行,之后深市会缺行。
> - §1.4 `tencent_ticks()` 改走复用连接、自动重试的 `V39_RETRY_SESSION`:一次约 70 秒 → 约 25 秒;连接失败、等响应超时、
>   429 / 5xx 自动重试,不再一次抖动就整次失败(读响应体中途卡住不重试)。
>   新增 `frame.attrs["complete"]`,15:31 以后用快照的盘后成交额核对盘后定价各笔(此前末尾缺笔完全看不出;低价 ETF 一两手的小额缺笔仍看不出)。
> - §13.7 `futures_kline()` 同样自动重试,单次超时收短到 (5, 20) 秒;补上中金所主力连续只从 2017-01-17 起。

> **V3.10.0(逐笔替代 / 期货日 K / 行情层重排,2026-09-22):** 85→87 个能力入口(82 主 + 5 备胎),来源数不变(34)。
> - **§1.4 腾讯逐笔 `tencent_ticks()`**:替代 #52 后返回空的 mootdx `transaction()`。最近一个交易日的全部分笔(沪深个股 + ETF),
>   收盘后与行情快照的当日成交额核对,连续竞价段缺笔直接报错;只有当日、不含北交所。
> - **§13.7 新浪期货日 K `futures_kline()`**:单个合约或主力连续的逐日 K 线,六家交易所含大商所(此前大商所只有实时价);
>   实测价格与交易所官方逐日一致。
> - **行情层重排**:能用的在前,mootdx 行情命令移到 §1.7 留档。新旧编号对照见 Layer 1 开头;下面历史版本说明里写的仍是旧编号。
> - **期货修正**:上期能源在各类数据首日前抛 `ValueError`(此前报成「格式可能已变」的 `RuntimeError`),期权首日更正为 2021-06-21;
>   上期所日行情实测最早 2002-01-07、中金所 2010-04-16,文档原写 2015 年。

> **V3.9.0(期货大宗 / 事件驱动 / 可转债 / 利率 + 四个 issue,2026-09-20):** 新增 §13 期货与大宗商品、§14 事件驱动、
> §15 可转债三层,并在原有各层补齐 K 线、研报、ETF 份额、新闻、ST 名单、沪市问答、利率曲线等入口。
> 12→15 层,60→85 个能力入口(80 主 + 5 备胎),22→34 个来源(新增通达信官网盘后包、华尔街见闻、央视网、上证e互动、
> 中债、中国货币网、上期所、上期能源、郑商所、中金所、广期所、上金所);无新增安装依赖,保留 Python 3.9。
> - **#52 mootdx 行情命令失效**:通达信公开服务器的 K 线 / 盘口 / 逐笔返回 0 行,财务与 F10 正常。`tdx_client(check='finance')`
>   让财务 / F10 按财务命令验活;K 线改走 §1.5 腾讯 / §1.6 通达信盘后包,`tdx_client()` 失败时的报错直接指路。
> - **#49 商品期货 / 期权**:§13 接入五家期货交易所官方日行情与商品 / 股指期权、四家(广期所除外)的会员持仓排名,另有新浪实时期货(含大商所)、
>   A50 期指与上海金交所现货。大商所官网有反爬,日行情未接入。
> - **#53 研报来源**:新增 §2.4 新浪研报列表,作为东财之外的第二来源(只有列表,无评级与目标价)。
> - **#55 聚宽代码**:`norm_ticker()` / `get_prefix()` 认 `.XSHG` / `.XSHE`,新增 `to_joinquant()`;FAQ 说明回测能力边界。
> - 新端点统一返回带 `source` / `source_url` / `fetched_at` 的 DataFrame,「确实没有」与「接口坏了」分开报错。
>   25 个新入口于 2026-09-20 用本文件原文代码实测,见 [本次数据源整合记录](docs/source-integration-v3.9.0.md)。

> **V3.8.0(官方指数与交易基础数据,2026-09-05):** 新增 §12 指数与交易日历层,
> 中证/国证成分与权重、中证 PE/股息率、深交所整月日历,以及沪深官方两融、北交所行情两个备胎。
> 11→12 层,54→60 个能力入口,19→22 个来源(新增中证、国证、北交所);无新增安装依赖,保留 Python 3.9。
> 国证当前文件是月末快照;历史调样、集合竞价、需 Key 的同花顺增强 API 暂不算已支持。
> 实测记录、候选取舍和边界见 [本次数据源整合记录](docs/source-integration-v3.8.0.md)。

> **V3.7.2(北交所号段判定对齐,2026-09-02):**`_natural_market()`(`norm_ticker()` 校验显式前缀是否自相矛盾)与 §8.5 `_anomaly_market()`(异动记录→交易所)此前只枚举 `43/83/87` 三个前两位与 `920`,而 `get_prefix()` 用 `startswith(("4", "8"))` + `startswith("92")` 覆盖整个北交所号段——同一份文件两套规则(#51)。现统一为 `startswith(("4", "8", "92"))`。实测(2026-09-01)北交所在市代码只有 `43x/83x/87x/920x` 四段、`921` 段尚未启用,故**不改变任何现有标的的判定结果**,修的是一致性与前向兼容。
>
> **V3.7.1(后缀路由修复,2026-08-20):**`get_prefix()` 认显式前缀(`sh000016`)却不认等价的后缀写法(`000016.SH`)——而 `norm_ticker()` 文档明文支持后缀式,且 `em_market_code()`/`em_secid()`(V3.7.0 新增)把**未归一化的原串**直接喂给 `get_prefix()`:`000016.SH` 以 `0` 开头落到默认深市分支,secid 拼成 `0.000016`(深康佳A)而非 `1.000016`(上证50 指数),**静默返回另一只标的的数据**。已在 `get_prefix()` 开头加后缀识别分支(`.sh/.sz/.bj` 与显式前缀等价透传),号段推断与沪指数白名单逻辑不变。⚠️ 走「前缀+原串拼接」的端点(`tencent_quote()`、新浪财报等)仍只认纯 6 位或前缀式——后缀式会把 `.SH` 拼进请求串,**先过 `norm_ticker()` 再传**的总原则不变。
>
> **V3.7.0(宏观层 + 筹码分布 + 复权因子 + 估值历史,2026-08-19):**新增 **1 个数据层、7 个端点、4 个数据源**(baostock / 申万 / 人民银行 / 国家统计局,全部零注册零 key)。全部端点于 2026-08-19 实跑验证。
>
> - **§4.6 筹码分布 CYQ** — 补上本层名实不符的窟窿:Layer 4 叫「资金面 / **筹码**层」但 §4.1~§4.5 全是资金面数据,一直没有真正的筹码分布。**东财没有公开 CYQ 接口**(实测 `push2`/`push2his` 的 `cyq/get` 均 404),本端点用 OHLC + 换手率**本地推演**,零新增数据源。输出获利比例 / 平均成本 / 90-70 成本区间与集中度 / 筹码峰。⚠️ 初始筹码**播种为首日全部流通盘**——从全零起步会把窗口前的存量持仓一笔勾销(两个 1% 换手日会被算成 50/50,真实应约 99%/1%)。
> - **§6.5 估值历史** — §1.2 腾讯只有**当日**估值快照,本端点给**日频历史序列**(实测茅台 2016-01-04 起 2581 行),并一次补齐此前完全缺失的四项:**换手率**(筹码分布的必需输入)、**停牌状态**、**ST 标记**(实测 000004 有 276 天 isST=1)、历史 PE/PB/PS/PCF。⚠️ **baostock 不支持北交所**,服务端报 `10004011`,本实现在**登录前**就拦掉抛 `ValueError`。
> - **§1.4 复权因子** — §1.1 通达信 `bars()` 是**不复权**数据,跨除权日直接比价必错。新浪 qfq/hfq 因子序列一次 HTTP 约 1.8KB。⚠️ 响应末尾挂着 `/* base64 */` 注释块,**不能用 `$` 锚定正则**,须用 `raw_decode`。
> - **§6.6 上市/退市日** — 唯一能拿到**退市日期**的零鉴权源,配合 §1.2 `is_stale` 可在筛选阶段剔除僵尸标的。
> - **§6.7 申万行业变迁史** — §3.7 东财只有**当前**行业归属,用它做历史研究是**前视偏差**。本端点给每只股票的行业变迁(实测 12,893 行 / 5,905 只 / 38 个一级行业;有标的历史变更过 10 次)。⚠️ 申万官方只发代码不发中文名。
> - **§11.1/§11.2 宏观层(新)** — 人民银行社融(月度 12 列)+ 国家统计局 PMI。⚠️ 社融链路是三级跳,未发布月份**整行丢弃**而非返回 NaN(否则调用方会把 12 行当 12 个月真数据);PMI 正文是全角括号**内带空格**,空白必须**整个删掉**才匹配得到。

> **V3.6.1(龙虎榜空窗口崩溃修复,2026-08-09 · #45):**`dragon_tiger_board()` 在回看窗口内无上榜记录时抛 `UnboundLocalError`——而大市值 / 低换手率标的(如贵州茅台)常态无上榜,等于**调用即崩**,调用方还无法区分「无数据」与「接口异常」。已修,空窗口返回语义一致的空结构。
>
> **V3.6.0(静默失败修复 + 重点监控池/日内异动,2026-07-31 · #15):**
> - **🔴 北交所老号段(43/83/87)会返回僵尸数据且不报错**:实测在市 342 只中 **336 只已迁至 `920xxx`**(锦波生物 `832982`→`920982`、贝特瑞 `835185`→`920185`),老码在东财研报静默返回 **0 篇**、在腾讯行情返回**定格报价**(成交量 0,价差达 17%~100%+)却仍是 HTTP 200。新增全局警告章节;`tencent_quote()` 增加 `is_stale`/`stale_reason` 标志(实测老码 2/2 命中、正常票 4/4 无误报);`eastmoney_reports()` 遇老码**抛 ValueError 而非返回空**。
> - **🔴 §2.1/§2.2 研报层 ticker 未归一化(静默空)**:`eastmoney_reports("SH600519")` / `"600519.SH"` 一律返回 **0 篇**(reportapi 只认纯 6 位),而文档「Ticker 格式归一化」明文承诺全接口支持带前缀写法——**承诺与实现不符,且失败方式是静默空**,调用方会误读成「该标的无研报覆盖」。新增 `norm_ticker()` 实现(解析失败抛 ValueError,绝不返回空串),`eastmoney_reports()` / `ths_eps_forecast()` 接入。
> - **§8.4 `em_stock_monitor()` 东财重点监控池新增(#15)**:交易所风险警示 / 重点监控名单 + 生效时间窗,零鉴权静态 JSON。
> - **§8.5 `em_price_anomaly()` / `em_price_anomaly_count()` 日内异动池新增(#15)**:交易所「严重异常波动」口径的异动明细与按标的聚合统计,含 12 条异动规则码全解释。⚠️ 必须带 `team=h5` 等固定参数,缺失返回 `unknow team`——已做 `result!=0` 冒泡而非静默返回空。
> - **§2.1 行业研报去硬编码日期**:`begin` 默认由固定的 `2024-01-01` 改为「相对今天往前两年」,避免时间窗越用越旧。
> - 端点 44 → 47。实测 24/24 通过(含前缀格式 4/4、老号段拦截、新端点真数据、异动接口拒绝冒泡)。
>
> **V3.5.0(板块资金流向,2026-07-23 · #37):**
> - **§3.8 `board_fund_flow()` 板块资金流向新增**:补上此前缺失的**板块级资金流**——行业/概念/地域三类板块 × 今日/5日/10日三周期,主力净流入额/净占比 + 超大/大/中/小单四档明细 + 领涨股。与 §3.7 板块排名**同源同接口**(东财 push2 `clist`),此前只请求了价格/涨跌家数字段,本版补请求 `f62/f184/f66...` 资金流字段即覆盖。走 `em_get` 限流防封。端点 43 → 44。
> - 实测(2026-07-23):行业今日 100 个板块主力净额降序(电力设备 64.66亿 = 超大 43.55亿 + 大 21.11亿)、概念 5 日、地域 10 日均真实返回;参数校验拒绝非法 board_type/period。
>
> **V3.4.1(前缀路由 + mootdx 验活修复,2026-07-23):**
> - **§1.2/§市场前缀规则 前缀路由修复(#40 #41)**:`5` 开头沪市 ETF(`510300`/`588200` 等)、沪深指数(`000300`/`000016` 等)此前落到 `else → sz`,腾讯接口返回空**或错票**(`000016` 被误判为 `sz000016` *ST康佳A,静默返回不相干标的的数据,比返空更危险)。`get_prefix()` 与 `tencent_quote()`

讨论

提问、分享技巧或报告无法使用。按“有帮助”数量排序。

还没有帖子,欢迎第一个提问或分享。

此处内容由用户撰写,不代表 PopNx 团队。

登录后发帖

来自 GitHub

GitHub 星标
11,847
开发者
simonlin1212
许可证
Apache-2.0
最近代码更新
2026年11月4日
repo 中的 SKILL.md 文件(含译本和模板)
1
主题
a-share, ai-agent, ai-skill, china-stocks, claude-code, financial-data, fintech, investment-research, llm-tools, market-data, python, quantitative-finance