A股数据:行情、财务、股东、资金流、K线、概念板块、龙虎榜、市场异动。 当用户查询沪深北 A 股时使用(例如:603186 华正新材、300476 胜宏科技、000001 平安银行、龙虎榜、北向资金)。

GitHub
安装命令
npx skhub add starchild-ai-agent/cn-stock
Markdown
SKILL.md

🇨🇳 cn-stock — China A-Share Data (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 tushare plugin), which injects the real API token server-side and bills the request per call. No local TUSHARE_TOKEN env var needed — the skill sends a fake token and sc-proxy replaces it before the request reaches Tushare.

Source 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.

Output Contract

Most functions return:

{"ok": bool, "source": str, "data": <payload>, "error": str|None, "ts": int}

Exception:

  • get_full_report(code) returns a combined dict of sub-results.

Code Format

Accepts:

  • 000001 / 603186 / 300476 (preferred)
  • 000001.SZ / 600000.SH / 830799.BJ (also accepted)

Auto mapping for 6-digit code:

  • 60/68/90 → SH
  • 00/20/30 → SZ
  • 4/8 → BJ

Function Map

Quote / company / K-line

FunctionWhat it returnsTushare endpoint(s)
get_realtime_quote(code)latest quote-like snapshot + valuationdaily + daily_basic
get_company_info(code)listed company profilestock_company
get_kline(code, period, start, end, adjust, limit)daily/weekly/monthly K-line (unadjusted)daily/weekly/monthly
get_adj_factor(code, days)adjust-factor series (for computing qfq/hfq manually)adj_factor
get_bid_ask(code)L1-L5 order booknot available in baseline permissions
get_stock_list(market, industry, list_status, limit)listed stock universe with optional filtersstock_basic
get_trade_calendar(start, end, exchange, open_only)trading day calendartrade_cal

Financials

FunctionWhat it returnsTushare endpoint(s)
get_financial(code, max_periods)key financial indicators by periodfina_indicator
get_income_statement(code, max_periods, period)利润表income
get_balance_sheet(code, max_periods, period)资产负债表balancesheet
get_cashflow_statement(code, max_periods, period)现金流量表cashflow
get_earnings_forecast(code, limit)业绩预告forecast
get_earnings_express(code, limit)业绩快报express
get_dividends(code, limit)分红送股dividend

Shareholders & ownership

FunctionWhat it returnsTushare endpoint(s)
get_holders(code, top)latest top shareholderstop10_holders
get_shareholder_count(code, periods)股东户数变化stk_holdernumber
get_shareholder_trades(code, days)重要股东增减持stk_holdertrade
get_block_trades(code, days)大宗交易block_trade

Fund flow & northbound

FunctionWhat it returnsTushare endpoint(s)
get_fund_flow(code, days)recent fund flowmoneyflow
get_margin_detail(code, days)融资融券明细margin_detail
get_north_holdings(code, days)沪深股通持股明细 (northbound)hk_hold
get_north_flow(days)沪深港通每日资金流向moneyflow_hsgt

Concept / industry / dragon-tiger / market-wide

FunctionWhat it returnsTushare endpoint(s)
get_concept_boards(top, sort_by)concept board listths_index
get_stock_concepts(code)stock concept membershipths_member
get_lhb(code, days)dragon-tiger records for stocktop_list (recent dates scan)
get_top_movers(direction, limit)market-wide top moversdaily (+ daily_basic)
get_limit_prices(code, trade_date, days)每日涨跌停价stk_limit
get_limit_board(trade_date, limit_type)当日涨停/跌停/炸板股limit_list_d
get_suspended(trade_date)每日停复牌suspend_d

Index data

FunctionWhat it returnsTushare endpoint(s)
get_index_basic(market)指数列表 (SSE/SZSE/MSCI/CSI/SW/...)index_basic
get_index_kline(index_code, period, start, end, limit)指数 K-line(含沪深300/上证/创业板等)index_daily/weekly/monthly

One-shot bundle

FunctionWhat it returns
get_full_report(code)quote + company + holders + fund_flowcombo

What this skill intentionally does NOT cover

  • News. Use normal web search (e.g. web_search) 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.
  • Adjusted K-line (qfq/hfq). The HTTP path only returns unadjusted bars. Use get_adj_factor + the unadjusted bars from get_kline if you need adjusted prices.
  • 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 get_kline for end-of-day.

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,非投资建议.

Maintenance notes

  • All requests POST http://api.tushare.pro/ with body {api_name, token, params, fields}.
  • token field is set to a fake key; sc-proxy tushare plugin replaces it before the upstream call.
  • To change pricing or rate limit, edit the proxy tushare plugin (see transparent-proxy-maintenance skill), not this skill.
  • Adding a new Tushare endpoint = adding one thin wrapper around _call(api_name, **params).
发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

未指定

源路径

cn-stock

默认分支

main

最新提交

cce29fd

Tree SHA

baca3ec