akshare-data

akshare-data is a skill for Claude Code, Codex from TencentCloud/Octop. It costs 219 tokens per session (1,937 once invoked), scanned A, original, MIT.

A skill for retrieving Chinese and global financial-market data through the AKShare command-line tool. AKShare provides functions for stocks, funds, futures, bonds, currencies, economic indicators, indexes, options, and financial news.

In plain words
What is it for?
Use it to retrieve market quotes, historical prices, fund or ETF values, futures, bonds, exchange rates, economic data, indexes, options, or finance news.
Why use it?
It helps find the right data function, limit large results, and try fallback methods when a first request fails.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to retrieve market quotes, historical prices, fund or ETF values, futures, bonds, exchange rates, economic data, indexes, options, or finance news.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tencentcloud/octop/stock-info
About the project

Octop is a self-hosted, multi-user AI assistant that runs multiple specialized agents and connects them to chat interfaces, tools, and external services. It is for individuals, families, and teams who want a locally operated assistant with shared experts and persistent capabilities. Catalogue add-ons extend its agent and assistant workflows.

TencentCloud/Octop · 1,513 stars · on GitHub · octop.cloud

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 TencentCloud/Octop --skill stock-info
Clone the repo
git clone --depth 1 https://github.com/TencentCloud/Octop

Made for: Claude Code, Codex.

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 akshare-data

README.md
[![agentmods](https://agentmods.dev/badge/skills/tencentcloud/octop/stock-info/github.svg)](https://agentmods.dev/skills/tencentcloud/octop/stock-info)
Your own site
<a href="https://agentmods.dev/skills/tencentcloud/octop/stock-info"><img src="https://agentmods.dev/badge/skills/tencentcloud/octop/stock-info/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 akshare-data

Your own site · 80×15
<a href="https://agentmods.dev/skills/tencentcloud/octop/stock-info"><img src="https://agentmods.dev/badge/skills/tencentcloud/octop/stock-info.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 219 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,937 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00219 $0.01937
Opus 5 $0.00110 $0.00968
Sonnet 5 $0.00044 $0.00387
Haiku 4.5 $0.00022 $0.00194

Measured 4d ago against content hash 68c3cdee587f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

akshare-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 4d ago.

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.

src/octop/infra/agents/experts/library/stock-assistant/skills/stock-info/SKILL.md · 164 lines

How it starts

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

AKShare 金融数据获取

akshare-cli 封装了 AKShare(1090+ 个函数),覆盖中国几乎所有金融数据及部分全球数据。

核心原则

  1. 轻量优先 — 查单只股票用 stock_individual_info_em(0.1s),不要用 stock_zh_a_spot_em(59s)。详见 references/known-issues.md
  2. 先查后调 — 不熟悉的函数先 --full-help 看参数,再 call。
  3. 失败必降级 — 不要在第一次失败后就告诉用户"查不到",走完三级降级。
  4. 控制输出量 — 全量接口加 --limit N --sort desc,确保拿到最新数据而非最旧数据。

工作流程:发现 → 查看 → 调用 → 降级

严格按以下步骤顺序执行,不要跳步。

第一步:发现函数

三种方式,按场景选一种:

A. 快捷命令(常用场景直接用,不需要搜索):

akshare-cli stock hist <代码> [--period daily|weekly|monthly] [--adjust qfq|hfq]
akshare-cli stock spot [--market all|sh|sz|bj|hk|us]
akshare-cli fund etf [代码]
akshare-cli futures hist <合约>
akshare-cli bond convertible
akshare-cli macro gdp | macro cpi
akshare-cli forex spot | forex hist [货币对]
akshare-cli index spot [--market global|cn]

B. 关键词搜索(知道大致方向时用):

akshare-cli search <关键词>    # 支持中英文

英文匹配函数名(结果更全),中文匹配描述和分类路径。

用户意图 英文关键词(推荐) 中文关键词
新闻 news 新闻
股票 stock 股票
涨停/跌停 stock_zt 涨停
龙虎榜 stock_lhb 龙虎榜
板块/概念 stock_board 板块
资金流向 fund_flow 资金流向
基金/ETF fund 基金
期货 futures 期货
债券 bond 债券
外汇 forex 外汇
宏观 macro 宏观
指数 index 指数

C. 按分类浏览(不确定关键词时用,按中文目录逐级查找):

akshare-cli browse                                # 30 个顶级分类
akshare-cli browse 股票数据/A股/历史行情数据          # 逐级深入
akshare-cli browse --func stock_zh_a_hist         # 反查函数归属

第二步:查看参数(用快捷命令时可跳过)

akshare-cli call --full-help <函数名>
akshare-cli call --full-help fn1,fn2,fn3       # 批量查询

输出包括:说明、数据源、目标地址、参数(含可选值枚举)、用法示例。

仔细看参数:不同函数参数名不同(symbol/code/indicator),有些有枚举约束,日期一般是 YYYYMMDD

第三步:调用

akshare-cli call <函数名> [--参数 值 ...] [--json] [--limit N] [--sort desc]

查最新数据时加 --sort desc --limit N,否则 --limit 会截取最旧的数据。

第四步:失败时三级降级

AKShare 底层爬取第三方网站,上游随时可能挂。失败后必须依次尝试:

第一级:换数据源后缀 _em(东方财富)失败 → 搜索 _ths(同花顺)或 _sina(新浪)同类函数:

akshare-cli search <相似关键词>

Read the full file on GitHub · 164 lines

Files

What ships with it

2 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. 4d ago Changed · +9 lines 68c3cdee587f
  2. 11d ago First seen · 155 lines · 219 tokens per session scan A dbe826f47599

Subscribe to this mod's changes

akshare-data is a skill published in the GitHub repository TencentCloud/Octop (1,513 stars, last pushed yesterday), licensed MIT. It adds 219 tokens to every session and 1,937 once invoked, about $0.0011 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.

Related

Other skills, from other repositories

cost-efficiency-analyzer

Analyzes cost structure, cost efficiency, and expense management from P&L data. Use when the user asks about costs, expenses, COGS, operating expenses, cost ratios, cost control, spending efficiency, margin compression from cost side, or wants to understand where money is going. Also use for "are we spending too…

awslabs/agentcore-samples · 98 tokens

multi-quarter-trend-analysis

Analyzes financial trends across multiple quarters by comparing P&L metrics over time. Use when the user wants to see trends, patterns, trajectories, or directional movement across 3 or more quarters. Also use for "how are we trending", "show me the trend", "track performance over time", "quarter over quarter…

awslabs/agentcore-samples · 82 tokens

executive-financial-briefing

Generates a concise executive-level financial briefing or summary suitable for a CEO, CFO, or board presentation. Use when the user asks for a summary, briefing, executive summary, board update, financial overview, financial health check, or "how is the business doing". Covers the full P&L picture in one page. Also…

awslabs/agentcore-samples · 95 tokens

quarterly-kpi-calculator

Calculates quarterly financial KPIs from P&L data. P&L figures can be provided directly by the user or fetched from the financial data MCP server. Use when the user wants KPI calculations such as Gross Margin %, EBITDA Margin %, Operating Expense Ratio, or Revenue Growth % QoQ. Also use for quarterly performance…

awslabs/agentcore-samples · 84 tokens

revenue-growth-analyst

Deep-dives into revenue growth patterns, growth rates, and growth quality. Use when the user asks specifically about revenue growth, top-line performance, sales growth, revenue acceleration or deceleration, growth trajectory, or wants to understand what is driving revenue changes. NOT for cost or margin analysis …

awslabs/agentcore-samples · 72 tokens

earnings-snapshot

Generate a concise earnings and fundamental snapshot for a stock, covering valuation, recent earnings news, and analyst positioning.

awslabs/agentcore-samples · 26 tokens