A Share Pro
A 股专业监控工具 - 轻量级自选股管理 + 多数据源实时行情。支持腾讯财经/雪球/百度/Tushare 自动切换,纯文本存储,无需数据库依赖。用于日常股票跟踪、自选股管理和投资组合监控。
New
Join 0+ developers using this skill
skill
Data & Analytics
intermediate
A 股专业监控工具 - 轻量级自选股管理 + 多数据源实时行情。支持腾讯财经/雪球/百度/Tushare 自动切换,纯文本存储,无需数据库依赖。用于日常股票跟踪、自选股管理和投资组合监控。
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
| 特性 | 说明 |
|---|---|
| ✅ 轻量级 | 纯文本存储,无需数据库 |
| ✅ 多数据源 | 腾讯/雪球/百度/Tushare 自动切换 |
| ✅ 持久化 | 自选股/交易记录本地保存 |
| ✅ 易维护 | 统一配置 + 模块化脚本 |
| ✅ 无 Token 依赖 | 主要使用免费数据源 |
cd ~/.openclaw/workspace/skills/a-share-pro/scripts chmod +x install.sh ./install.sh
会自动完成:
~/.openclaw/a_share/ 数据目录# 方式一:只输入代码(名称默认"未知") python3 add_stock.py 600919方式二:指定股票名称
python3 add_stock.py 600919 江苏银行
python3 list_stocks.py
输出示例:
📋 你的自选股: ================================================== 序号 代码 名称 -------------------------------------------------- 1 600919 江苏银行 2 600926 杭州银行 3 159681 创业板 ETF ================================================== 共计 3 只股票
python3 summarize_performance.py
输出示例:
====================================================================== 💼 A-Share Pro - 自选股实时行情 ====================================================================== ✅ 600919 - 江苏银行 💰 ¥10.59 +0.10 (+0.95% ) [🐧 腾讯财经] ✅ 600926 - 杭州银行 💰 ¥16.57 +0.08 (+0.49% ) [🐧 腾讯财经] ...====================================================================== 📊 持仓概览:3 只 | 上涨:3 只 | 下跌:0 只 📉 平均涨跌幅:+1.46% 💡 整体趋势:📈 整体偏强
a-share-pro/ ├── SKILL.md # 主文档 ├── README.md # 使用说明 └── scripts/ ├── config.py # ⭐ 统一配置 ├── monitor.py # ⭐ 核心监控模块 │ ├── add_stock.py # 添加股票 ├── remove_stock.py # 删除股票 ├── list_stocks.py # 查看列表 ├── clear_watchlist.py # 清空列表 ├── summarize_performance.py# ⭐ 行情汇总 │ └── install.sh / uninstall.sh
# 批量添加 for code in 600919 600926 600025; do python3 add_stock.py $code done
# 添加到 crontab(每天收盘后 15:30) # crontab -e 30 15 * * * cd ~/.openclaw/workspace/skills/a-share-pro/scripts && python3 summarize_performance.py
# 自定义脚本导出 import pandas as pdstocks = ['600919', '600926'] data = []
for code in stocks: from monitor import AShareMonitor monitor = AShareMonitor() quote = monitor.get_quote(code) data.append(quote)
df = pd.DataFrame(data) df.to_excel('持仓报告.xlsx', index=False)
600919|江苏银行 600926|杭州银行 159681|创业板 ETF
每行格式:
代码 | 名称
2026-03-05|600919|buy|7.80|5000|备注 2026-03-01|600926|sell|8.50|1000|部分止盈
每行格式:
日期 | 代码 | 买卖 | 价格 | 数量 | 备注
系统会自动按以下顺序尝试获取数据:
编辑
scripts/config.py:
WATCHLIST_FILE = "~/.openclaw/a_share/watchlist.txt" DATA_SOURCES_PRIORITY = ["tencent", "xueqiu"] # 只用腾讯和雪球 REQUEST_DELAY = 0.5 # 请求间隔改为 0.5 秒
直接编辑数据文件:
nano ~/.openclaw/a_share/watchlist.txt # 手动添加/删除股票,或使用 clear_watchlist.py 清空
目前仅支持 A 股(沪市/深市/科创板)。如需港股/美股,建议增加 Yahoo Finance 或新浪财经接口。
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.