By StanleyChanH
Access 220+ TuShare Pro API endpoints for Chinese financial market data including A-shares, Hong Kong stocks, US stocks, funds, futures, bonds, stock quotes, financial statements, and macroeconomic indicators (GDP, CPI). Automatically activates when users request stock prices, financial analysis, index data, or economic metrics.
获取中国金融市场数据的 OpenClaw Skill,支持 220+ 个 Tushare Pro 接口。
clawhub install tushare-finance
git clone https://github.com/StanleyChanH/Tushare-Finance-Skill-for-Claude-Code.git
cd Tushare-Finance-Skill-for-Claude-Code
pip install -r requirements.txt
export TUSHARE_TOKEN="your_token_here"
from scripts.api_client import TushareAPI
# 初始化客户端
api = TushareAPI()
# 查询股票日线行情
df = api.get_stock_daily("000001.SZ", "2024-01-01", "2024-12-31")
print(df.head())
# 查询公司基本信息
info = api.get_stock_info("000001.SZ")
print(info)
# 批量查询多只股票
stocks = ["000001.SZ", "000002.SZ", "600000.SH"]
data = api.batch_query(stocks, "2024-01-01", "2024-12-31")
| 类别 | 接口数量 | 示例接口 |
|---|---|---|
| 股票数据 | 39 | daily, stock_basic, fina_indicator, income |
| 指数专题 | 18 | index_daily, index_weight, index_basic |
| 公募基金 | 11 | fund_nav, fund_basic, fund_hold |
| 期货期权 | 16 | futures_daily, opt_daily |
| 宏观经济 | 10 | gdp, cpi, pmi, shibor |
| 港股美股 | 23 | hk_daily, us_daily |
| 债券专题 | 16 | cb_basic, cb_price |
| ETF专题 | 7 | etf_basic, fund_etf_hist |
| 大模型语料 | 7 | news, anns, policy |
| 行业经济 | 8 | movie, box_office |
完整接口列表:查看 接口文档索引
本项目通过 GitHub Actions 自动从 Tushare 官方文档 同步 API 文档。
每周一 10:00 CST (自动) / 手动触发
│
├─ Playwright 登录 Tushare
├─ ddddocr 自动识别验证码
├─ 爬取 220+ 文档页面
├─ SHA256 增量对比,只更新有变更的文档
├─ 内容质量校验
└─ 自动创建 Pull Request
在 GitHub Actions 页面点击 "Run workflow",支持以下参数:
| 参数 | 说明 |
|---|---|
dry_run | 只检测变更,不写入文件 |
max_docs | 最大爬取数量(测试用) |
doc_id | 只爬取指定文档 |
需要在仓库 Settings → Secrets 中配置:
| Secret | 说明 |
|---|---|
TUSHARE_ACCOUNT | Tushare 登录手机号或邮箱 |
TUSHARE_PASSWORD | Tushare 登录密码 |
├── SKILL.md # Skill 定义文件
├── QUICK_REFERENCE.md # 快速参考
├── scripts/
│ ├── api_client.py # Python API 客户端
│ └── crawl_docs.py # 文档自动同步爬虫
├── reference/
│ ├── README.md # 接口文档索引
│ ├── all_links.json # 全部接口链接
│ └── 接口文档/ # 220+ 个接口 Markdown 文件
└── .github/workflows/
├── sync-docs.yml # 文档自动同步工作流
└── sync-to-clawhub.yml # ClawHub 发布工作流
欢迎贡献代码、报告问题或提出建议!
Apache License 2.0
all_links.json 和 README.md 索引Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub stanleychanh/tushare-finance-skill-for-claude-codeA-share market data query skills for tushare-cli: stock, index, concepts, sector rotation, financials, futures, forex
BaoStock A-share securities data API reference — 23 endpoints covering K-line, financials, macro, dividends, and industry classification with 9 documented pitfalls
OpenClaw stock skill leveraging Akshare for real-time stock data retrieval and analysis.
Developer-first financial data for Claude — 150k+ tickers, 70+ exchanges, real-time & historical prices, fundamentals, options, technicals, news, sentiment, macro indicators, ESG, and more via EODHD API and MCP Server.
A股量化交易 Skill - 使用 Tushare Pro 获取数据,Backtrader 进行回测
金融量化框架与投研