cn-stock
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese🇨🇳 cn-stock — China A-Share Data (Tushare via sc-proxy)
🇨🇳 cn-stock — 中国A股数据(基于Tushare via sc-proxy)
Comprehensive A-share skill that uses Tushare Pro as the single upstream source.
All API calls are routed through sc-proxy (transparent-proxy plugin),
which injects the real API token server-side and bills the request per call.
No local env var needed — the skill sends a fake token and
sc-proxy replaces it before the request reaches Tushare.
tushareTUSHARE_TOKEN一款全面的A股技能,以Tushare Pro作为唯一上游数据源。
所有API请求均通过sc-proxy(透明代理插件)路由,该插件会在服务端注入真实的API令牌,并按请求次数计费。
无需本地设置环境变量——该技能会发送一个假令牌,sc-proxy会在请求到达Tushare之前将其替换为真实令牌。
tushareTUSHARE_TOKENSource Strategy
数据源策略
your call → exports.py (cn-stock)
└─ proxied_post → sc-proxy (tushare plugin) → http://api.tushare.pro/- No Sina / Eastmoney / akshare scraping fallback.
- No local API key needed.
- Charging is per-request via sc-proxy.
your call → exports.py (cn-stock)
└─ proxied_post → sc-proxy (tushare plugin) → http://api.tushare.pro/- 不支持新浪/东方财富/akshare数据爬取作为备用方案。
- 无需本地API密钥。
- 通过sc-proxy按请求次数收费。
Output Contract
输出约定
Most functions return:
python
{"ok": bool, "source": str, "data": <payload>, "error": str|None, "ts": int}Exception:
- returns a combined dict of sub-results.
get_full_report(code)
大多数函数返回:
python
{"ok": bool, "source": str, "data": <payload>, "error": str|None, "ts": int}例外情况:
- 返回子结果的组合字典。
get_full_report(code)
Code Format
代码格式
Accepts:
- /
000001/603186(preferred)300476 - /
000001.SZ/600000.SH(also accepted)830799.BJ
Auto mapping for 6-digit code:
- → SH
60/68/90 - → SZ
00/20/30 - → BJ
4/8
支持的格式:
- /
000001/603186(推荐格式)300476 - /
000001.SZ/600000.SH(同样支持)830799.BJ
6位代码自动映射规则:
- → SH(上海证券交易所)
60/68/90 - → SZ(深圳证券交易所)
00/20/30 - → BJ(北京证券交易所)
4/8
Function Map
函数映射
Quote / company / K-line
行情/公司信息/K线
| Function | What it returns | Tushare endpoint(s) |
|---|---|---|
| latest quote-like snapshot + valuation | |
| listed company profile | |
| daily/weekly/monthly K-line (unadjusted) | |
| adjust-factor series (for computing qfq/hfq manually) | |
| L1-L5 order book | not available in baseline permissions |
| listed stock universe with optional filters | |
| trading day calendar | |
| 函数 | 返回内容 | Tushare 接口 |
|---|---|---|
| 最新行情快照及估值数据 | |
| 上市公司基本信息 | |
| 日/周/月K线(不复权) | |
| 复权因子序列(用于手动计算前复权/后复权价格) | |
| L1-L5买卖盘数据 | 基础权限不支持 |
| 可选过滤条件的上市公司列表 | |
| 交易日历 | |
Financials
财务数据
| Function | What it returns | Tushare endpoint(s) |
|---|---|---|
| key financial indicators by period | |
| 利润表 | |
| 资产负债表 | |
| 现金流量表 | |
| 业绩预告 | |
| 业绩快报 | |
| 分红送股 | |
| 函数 | 返回内容 | Tushare 接口 |
|---|---|---|
| 各期关键财务指标 | |
| 利润表 | |
| 资产负债表 | |
| 现金流量表 | |
| 业绩预告 | |
| 业绩快报 | |
| 分红送股 | |
Shareholders & ownership
股东与持股
| Function | What it returns | Tushare endpoint(s) |
|---|---|---|
| latest top shareholders | |
| 股东户数变化 | |
| 重要股东增减持 | |
| 大宗交易 | |
| 函数 | 返回内容 | Tushare 接口 |
|---|---|---|
| 最新前十大股东 | |
| 股东户数变化 | |
| 重要股东增减持 | |
| 大宗交易 | |
Fund flow & northbound
资金流向与北向资金
| Function | What it returns | Tushare endpoint(s) |
|---|---|---|
| recent fund flow | |
| 融资融券明细 | |
| 沪深股通持股明细 (northbound) | |
| 沪深港通每日资金流向 | |
| 函数 | 返回内容 | Tushare 接口 |
|---|---|---|
| 近期资金流向 | |
| 融资融券明细 | |
| 沪深股通持股明细(北向资金) | |
| 沪深港通每日资金流向 | |
Concept / industry / dragon-tiger / market-wide
概念/行业/龙虎榜/市场全景
| Function | What it returns | Tushare endpoint(s) |
|---|---|---|
| concept board list | |
| stock concept membership | |
| dragon-tiger records for stock | |
| market-wide top movers | |
| 每日涨跌停价 | |
| 当日涨停/跌停/炸板股 | |
| 每日停复牌 | |
| 函数 | 返回内容 | Tushare 接口 |
|---|---|---|
| 概念板块列表 | |
| 个股所属概念板块 | |
| 个股龙虎榜记录 | |
| 市场涨跌排名个股 | |
| 每日涨跌停价 | |
| 当日涨停/跌停/炸板股 | |
| 每日停复牌 | |
Index data
指数数据
| Function | What it returns | Tushare endpoint(s) |
|---|---|---|
| 指数列表 (SSE/SZSE/MSCI/CSI/SW/...) | |
| 指数 K-line(含沪深300/上证/创业板等) | |
| 函数 | 返回内容 | Tushare 接口 |
|---|---|---|
| 指数列表(上证/深证/MSCI/CSI/SW/...) | |
| 指数K线(含沪深300/上证/创业板等) | |
One-shot bundle
一站式汇总
| Function | What it returns | |
|---|---|---|
| quote + company + holders + fund_flow | combo |
| 函数 | 返回内容 | |
|---|---|---|
| 行情+公司信息+股东+资金流向 | 组合接口 |
What this skill intentionally does NOT cover
本技能明确不涵盖的内容
- News. Use normal web search (e.g. ) for stock-related news, announcements, and articles. Tushare news has heavy rate limits and overlaps with general web coverage; running it through the paid proxy adds no value.
web_search - Adjusted K-line (qfq/hfq). The HTTP path only returns unadjusted bars. Use + the unadjusted bars from
get_adj_factorif you need adjusted prices.get_kline - Intraday tick / bid-ask L1-L5. Requires upstream independent realtime permission that is not in baseline.
- Minute bars. Requires upstream independent permission; not exposed here. Use for end-of-day.
get_kline
- 新闻资讯:如需股票相关新闻、公告及文章,请使用常规网页搜索(如)。Tushare的新闻接口有严格的调用限制,且内容与通用网页覆盖范围重叠,通过付费代理调用无额外价值。
web_search - 复权K线(前复权/后复权):HTTP接口仅返回不复权K线数据。如需复权价格,请使用获取复权因子,结合
get_adj_factor返回的不复权K线数据自行计算。get_kline - 日内逐笔成交/买卖盘L1-L5数据:需要上游独立的实时数据权限,不在基础权限范围内。
- 分钟K线:需要上游独立权限,此处未开放。请使用获取日线数据。
get_kline
User-facing reply guidance
面向用户的回复指南
When answering users:
- Show values in readable Chinese market units (,
亿).% - Clearly label data as end-of-day, not intraday tick.
- If a capability is unavailable, say it directly.
- Add source note: .
数据来源:Tushare Pro,非投资建议
回复用户时:
- 使用符合中国市场习惯的易读单位(、
亿)展示数值。% - 明确标注数据为日线收盘数据,而非日内逐笔成交数据。
- 若某项功能不可用,请直接告知用户。
- 添加来源说明:。
数据来源:Tushare Pro,非投资建议
Maintenance notes
维护说明
- All requests POST with body
http://api.tushare.pro/.{api_name, token, params, fields} - field is set to a fake key; sc-proxy
tokenplugin replaces it before the upstream call.tushare - To change pricing or rate limit, edit the proxy plugin (see
tushareskill), not this skill.transparent-proxy-maintenance - Adding a new Tushare endpoint = adding one thin wrapper around .
_call(api_name, **params)
- 所有请求均以POST方式发送至,请求体为
http://api.tushare.pro/。{api_name, token, params, fields} - 字段设置为假密钥;sc-proxy的
token插件会在请求发送至上游前将其替换为真实密钥。tushare - 如需调整定价或调用限制,请修改代理的插件(详见
tushare技能),而非本技能。transparent-proxy-maintenance - 添加新的Tushare接口只需围绕添加一个轻量包装函数即可。
_call(api_name, **params)