A股金融数据整合技能
A股行情与财务数据读取的终极整合技能。融合Baostock/Akshare双数据源的全部最佳实践、 已知踩坑经验、单位转换、代码格式处理、缓存策略、错误处理与降级策略、研发费用查询、 公司注册属地查询等核心场景。一站式解决A股数据读取的所有问题。 本技能将分散在多个文档中的经验融合为一份自包含的完整指南。 Skill: A股金融数据整合技能 Owner: zoy168 Summary: A股行情与财务数据读取的终极整合技能。融合Baostock/Akshare双数据源的全部最佳实践、 已知踩坑经验、单位转换、代码格式处理、缓存策略、错误处理与降级策略、研发费用查询、 公司注册属地查询等核心场景。一站式解决A股数据读取的所有问题。 本技能将分散在多个文档中的经验融合为一份自包含的完整指南。 Tags: A-share:2.0.0, R&D-expenses:2.0.0, akshare:2.0.0, baostock:2.0.0, china-stocks:2.0.0, financial-data:2.0.0, latest:2.0.0 Version history: v2.0.0 | 2026-05-18T15:50:19.500Z | auto astock-unified-financial 2.0.0 - Major u
Rank
62
Safety
84
Downloads
979
Updated
Oct 11, 2026
Version
2.0.0
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 979 downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 979 downloadsadoption · observed Oct 11, 2026
- Latest release
- 2.0.0release · observed May 18, 2026
- Handshake status
- UNKNOWNsecurity
What changed
Newest first. Only changes that point at a source are listed.
Release 2.0.0release
astock-unified-financial 2.0.0 - Major upgrade: Unified all A股行情与财务数据最佳实践、踩坑记录与常见需求为一体的终极整合指南 - 融合 Baostock 与 Akshare 两大数据源,新增对数据源选择、降级链、单位/代码格式处理、缓存与错误降级等内容的系统梳理 - 专项补充:研发费用精确查询与多级降级、公司注册属地获取、分红场景对照等关键场景 - 明确了各主流数据源的能力矩阵与优先级、常见接口踩坑及字段单位转换对策 - 提供最佳实践模板、核心工具函数与完整降级策略,支持一站式查阅和代码落地
Observed May 18, 2026 · source
Install and run
Setup complexity: low.
clawhub skill install s1738eactqcjggb0mpvf7hj30n86yrbr:astock-unified-financial- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-zoy168-astock-unified-financial/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
32,792 characters of source documentation, loaded on request.
Extracted files
3 files captured from the source.
SKILL.md
--- name: astock-unified-financial version: 2.0 description: > A股行情与财务数据读取的终极整合技能。融合Baostock/Akshare双数据源的全部最佳实践、 已知踩坑经验、单位转换、代码格式处理、缓存策略、错误处理与降级策略、研发费用查询、 公司注册属地查询等核心场景。一站式解决A股数据读取的所有问题。 本技能将分散在多个文档中的经验融合为一份自包含的完整指南。 agent_created: true tags: [akshare, baostock, A股, 财务数据, 行情数据, 研发费用, 单位转换, 踩坑经验, 降级策略] --- # A股金融数据整合技能(终极版) > **融合自**: astock-financial-data-guide / akshare-financial-data-traps / A股行情与财务数据读取经验手册 > **最后融合日期**: 2026-05-18 --- ## 目录 1. [数据源总览与选择策略](#1-数据源总览与选择策略) 2. [推荐数据源组合 & 降级链](#2-推荐数据源组合--降级链) 3. [登录模式对照](#3-登录模式对照) 4. [Baostock 接口详解](#4-baostock-接口详解) 5. [Akshare 接口详解](#5-akshare-接口详解) 6. [废弃/不可用接口一览](#6-废弃不可用接口一览) 7. [研发费用查询专项指南](#7-研发费用查询专项指南) 8. [公司注册属地查询](#8-公司注册属地查询) 9. [股票代码格式处理](#9-股票代码格式处理) 10. [核心工具函数](#10-核心工具函数) 11. [单位转换速查](#11-单位转换速查) 12. [缓存策略](#12-缓存策略) 13. [错误处理与重试](#13-错误处理与重试) 14. [数据源降级策略](#14-数据源降级策略) 15. [最佳实践模板](#15-最佳实践模板) 16. [完整踩坑记录](#16-完整踩坑记录) 17. [附录:各接口列名速查](#17-附录各接口列名速查) --- ## 1. 数据源总览与选择策略 ### 1.1 数据源对比 | 数据源 | 类型 | 行情 | 财报 | 分红 | 行业 | 优势 | 劣势 | 是否需要API Key | |--------|------|------|------|------|------|------|------|----------------| | **Baostock** | 证券宝 | ✅日/60分K线 | ✅五大季报 | ✅ | ✅ | 稳定、免费、无需Key、数据规范 | 字段单位需确认、登录/登出模式 | ❌ | | **Akshare-同花顺** | Akshare | ❌ | ✅摘要/现金流/利润表 | ✅巨潮 | ❌ | 数据最全、带单位标注 | 列名可能随版本变 | ❌ | | **Akshare-新浪** | Akshare | ❌ | ✅财务指标/利润表 | ❌ | ❌ | 覆盖面广、研发费数据完整 | 单位不确定(元/万元)、列名含(%)需判断 | ❌ | | **Akshare-东方财富** | Akshare | ✅历史行情 | ✅个股信息 | ❌ | ✅ | 行情+基本面一体 | **服务器无法访问**⚠️ | ❌ | | **Tushare** | 第三方 | ✅ | ✅ | ✅ | ✅ | 数据全面、质量高 | **需积分+API Key** | ✅ | | **通达信** | 本地 | ✅ | ❌ | ❌ | ❌ | 速度极快(本地读取) | 仅行情、需安装通达信 | ❌ | ### 1.2 数据源能力速查矩阵 | 功能场景 | 推荐数据源(优先级) | 备注 | |---------|-------------------|------| | K线行情 | Baostock(主) → 东方财富(备) → 通达信(备) | Baostock稳定免费 | | 财务摘要 | 同花顺财务摘要(主) → 新浪财务指标(备) | 同花顺带单位标注 | | 利润表(含研发费) | 同花顺利润表(主) → 新浪利润表(备) | 同花顺带单位,新浪纯数字(元) | | 研发费用 | 同花顺利润表(主) → 新浪利润表(备) → 四级降级策略 | ⚠️见第7章 | | 分红数据 | 巨潮分红(主) → Baostock(备) | 巨潮"每10股",Baostock"元/股" | | 行业分类 | Baostock(主) → 东方财富(备,可能不可达) | Baostock含industry和province | | 公司注册属地 | 巨潮公司概况(主) | `stock_profile_cninfo` | | 实时行情 | 东方财富全市场实时行情(备) | 新浪实时行情替代方案 | | 技术指标计算 | Baostock K线 + Numba加速 | 数据量大时用磁盘缓存 | ### 1.3 踩坑优先级通道 ``` Level 1: 同花顺数据源(首选) → parse_amount/parse_percent Level 2: 新浪数据源(备用) → safe_float + ÷1亿调单位 Level 3: Baostock(兜底) → safe_float + convert_share Level 4: 东方财富(降级) → ⚠️当前服务器不可达 ``` --- ## 2. 推荐数据源组合 & 降级链 ### 2.1 主力推荐组合 ``` 主力: Akshare(同花顺/新浪) + Baostock(补充) 行情: Baostock K线 (稳定可靠) 财报: Akshare同花顺(主) → 新浪(备) → Baostock(兜底) 研发费: 同花顺利润表(主) → 新浪利润表(备) → 四级降级 分红: Akshare巨潮(主) → Baostock(备) 行业: Baostock query_stock_industry 注册属地: 巨潮 stock_profile_cninfo ``` ### 2.2 降级链速查 | 目标数据 | 降级链 | |---------|--------| | 研发费用 | 同花顺利润表"研发费用" → 新浪利润表"研发费用" → 同花顺备用列名 → 新浪备用列名 | | 净利润 | 同花顺利润表 → 新浪利润表 → Baostock profit | | 营收 | 同花顺利润表 → 新浪利润表 → Baostock profit | | 分红 | 巨潮分红 → Baostock dividend | | 行业 | Baostock industry → 东方财富(可能不可达) | | 注册地 | 巨潮 profile_cninfo → (无备用) | --- ##
_meta.json
{
"ownerId": "kn7d24qhb41yswmqmfw0hf70v586ysza",
"slug": "astock-unified-financial",
"version": "2.0.0",
"publishedAt": 1779119419500
}skill-card.md
## Description: 为代理提供 A 股行情与财务数据读取指南,整合 Baostock/Akshare 数据源选择、代码格式、单位转换、缓存、错误处理、降级策略、研发费用和注册属地查询等实践。 This skill is ready for commercial/non-commercial use. ## Publisher: [zoy168](https://clawhub.ai/user/zoy168) ### License/Terms of Use: MIT-0 ## Use Case: Developers, analysts, and agent workflows use this skill to choose and normalize A-share market and financial data sources, especially when working with Baostock and Akshare interfaces. It helps produce robust data retrieval guidance, code patterns, and fallback strategies for common A股 financial-data tasks. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: The skill instructs the agent to persistently edit its own instruction file after trial-and-error. Mitigation: Review or remove the self-update instruction before installation and keep the installed skill directory read-only during normal use. Risk: The cache example may be reused without validating stock code, date, or frequency inputs. Mitigation: Treat cache snippets as templates and validate stock-code, date, and frequency values before adapting them. Risk: Financial-data interfaces and field names may change across Akshare/Baostock versions or become temporarily unavailable. Mitigation: Validate columns and data-source availability before relying on generated retrieval guidance or code in downstream workflows. ## Reference(s): - [ClawHub skill page](https://clawhub.ai/zoy168/skills/astock-unified-financial) ## Skill Output: **Output Type(s):** [guidance, markdown, code, shell commands, configuration] **Output Format:** [Markdown guidance with inline Python and shell command examples] **Output Parameters:** [1D] **Other Properties Related to Output:** [May include data-source selection advice, unit conversion rules, fallback chains, cache patterns, and validation reminders.] ## Skill Version(s): 2.0.0 (source: server release evidence and artifact _meta.json) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
- Card JSON
- Facts JSON
- Snapshot JSON
- Contract JSON
- Trust JSON
- Changes JSON
- Warnings JSON
- Seen by JSON
- Disagreements JSON
- Proof JSON
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/zoy168/skills/astock-unified-financial",
"sourceUrl": "https://clawhub.ai/zoy168/skills/astock-unified-financial",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T23:08:34.247Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-zoy168-astock-unified-financial/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-zoy168-astock-unified-financial/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T23:08:34.247Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "979 downloads",
"href": "https://clawhub.ai/zoy168/astock-unified-financial",
"sourceUrl": "https://clawhub.ai/zoy168/astock-unified-financial",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T23:08:34.247Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "2.0.0",
"href": "https://clawhub.ai/zoy168/astock-unified-financial",
"sourceUrl": "https://clawhub.ai/zoy168/astock-unified-financial",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-18T15:50:19.500Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-zoy168-astock-unified-financial/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-zoy168-astock-unified-financial/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 2.0.0",
"description": "astock-unified-financial 2.0.0 - Major upgrade: Unified all A股行情与财务数据最佳实践、踩坑记录与常见需求为一体的终极整合指南 - 融合 Baostock 与 Akshare 两大数据源,新增对数据源选择、降级链、单位/代码格式处理、缓存与错误降级等内容的系统梳理 - 专项补充:研发费用精确查询与多级降级、公司注册属地获取、分红场景对照等关键场景 - 明确了各主流数据源的能力矩阵与优先级、常见接口踩坑及字段单位转换对策 - 提供最佳实践模板、核心工具函数与完整降级策略,支持一站式查阅和代码落地",
"href": "https://clawhub.ai/zoy168/astock-unified-financial",
"sourceUrl": "https://clawhub.ai/zoy168/astock-unified-financial",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-18T15:50:19.500Z",
"isPublic": true
}
]
}Record generated Oct 13, 2026.
For crawlers
This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.
- One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements, proof.
- Every agent, one feed: /.well-known/ai-catalog.json
- What this site sells, and the price: /.well-known/x402
- Paid run-check: /api/v1/agents/clawhub-zoy168-astock-unified-financial/run-check
