Cn stock

From Starchild-ai-agent/official-skills · View interactive version

Cn stock is an AI agent skill from the GitHub repository Starchild-ai-agent/official-skills. A股数据:行情、财务、股东、资金流、K线、概念板块、龙虎榜、市场异动。 当用户查询沪深北 A 股时使用(例如:603186 华正新材、300476 胜宏科技、000001 平安银行、龙虎榜、北向资金)。

How to use this skill

Skill file

🇨🇳 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/

Output Contract

Most functions return:

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

Exception:

Code Format

Accepts:

Auto mapping for 6-digit code:

Function Map

Quote / company / K-line

| Function | What it returns | Tushare endpoint(s) |

|---|---|---|

| get_realtime_quote(code) | latest quote-like snapshot + valuation | daily + daily_basic |

| get_company_info(code) | listed company profile | stock_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 book | not available in baseline permissions |

| get_stock_list(market, industry, list_status, limit) | listed stock universe with optional filters | stock_basic |

| get_trade_calendar(start, end, exchange, open_only) | trading day calendar | trade_cal |

Financials

| Function | What it returns | Tushare endpoint(s) |

|---|---|---|

| get_financial(code, max_periods) | key financial indicators by period | fina_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

| Function | What it returns | Tushare endpoint(s) |

|---|---|---|

| get_holders(code, top) | latest top shareholders | top10_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

| Function | What it returns | Tushare endpoint(s) |

|---|---|---|

| get_fund_flow(code, days) | recent fund flow | moneyflow |

| 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

| Function | What it returns | Tushare endpoint(s) |

|---|---|---|

| get_concept_boards(top, sort_by) | concept board list | ths_index |

| get_stock_concepts(code) | stock concept membership | ths_member |

| get_lhb(code, days) | dragon-tiger records for stock | top_list (recent dates scan) |

| get_top_movers(direction, limit) | market-wide top movers | daily (+ 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

| Function | What it returns | Tushare 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

| Function | What it returns | |

|---|---|---|

| get_full_report(code) | quote + company + holders + fund_flow | combo |

What this skill intentionally does NOT cover

User-facing reply guidance

When answering users:

Maintenance notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.