← 返回 Skills 市场
83
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install a-stock-holding-monitor
功能描述
A股持仓监控脚本。监控持仓股票的止损/支撑破位/目标价/异常波动,触发条件时提醒。适合配合cron定时运行。
使用说明 (SKILL.md)
A股持仓监控脚本
监控A股持仓的止损、支撑、目标价和异常波动。
功能
- 实时获取持仓股票现价
- 检测是否触及止损/支撑/目标位
- 计算浮盈/浮亏
- 乖离率超5%警告
- 当日跌幅超5%异动告警
触发条件
| 条件 | 标记 | 操作建议 |
|---|---|---|
| 触及止损价 | 🔴 | 建议止损 |
| 跌破支撑位 | 🟠 | 关注是否企稳 |
| 当日跌幅>5% | 🔴 | 异动告警 |
| 乖离率>+5% | ⚠️ | 短线过热 |
文件
holding_monitor.py- 主程序
安装
- 下载脚本
- 修改脚本顶部的
HOLDINGS列表,填入你的持仓 - 设置执行权限:
chmod +x holding_monitor.py
配置
编辑 HOLDINGS 列表:
HOLDINGS = [
{
"name": "贵州茅台",
"code": "sh600519", # sh=上证 sz=深证
"cost": 1800.0,
"qty": 10,
"stop_loss": 1700.0,
"support": 1750.0,
"target": "2000-2100",
"optimistic": 2200,
},
]
运行方式
手动运行:
python3 holding_monitor.py
定时检查(每天9:30-15:00每30分钟一次):
# 添加到crontab
crontab -e
# 写入:
*/30 9-15 * * 1-5 /path/to/holding_monitor.py >> /path/to/holding_monitor.log 2>&1
输出示例
[2026-04-17 14:00:00] 持仓检查...
贵州茅台: 现价1850.0 +2.78% 浮盈+500元(+2.78%)
洛阳钼业: 现价20.16 -0.64% 浮盈+3元(+0.07%)
→ 持有
📊 A股持仓监控
---
【贵州茅台 sh600519】
现价: 1850.000 +2.78%
成本: 1800.000 浮盈: +500元(+2.78%)
MA5: 1820.00 乖离率: +1.65%
支撑: 1750.0 止损: 1700.0 目标: 2000-2100
→ 操作建议: 持有
注意事项
- 需要网络连接获取实时行情
- 数据源:新浪财经API
- 止损和支撑位需要根据个人风险承受能力设置
- 建议配合飞书/微信机器人实现推送通知
安全使用建议
This script appears to do what it says: fetch public quotes from Sina, compute signals, print output, and save a /tmp status file. Before installing/running: 1) Review and edit the HOLDINGS list in the script (do not paste secrets into it). 2) Prefer running with a controlled python environment (venv) and check the shebang — it points to a Homebrew python; you may want /usr/bin/env python3 instead. 3) Run it as a non-privileged user and confirm the /tmp/holding_check.json contents and permissions meet your privacy needs. 4) If you add notification integrations (飞书/微信), keep credentials out of the script and store them securely (env or protected config). 5) If running from cron, ensure the cron PATH/python match your environment so the script uses the intended interpreter.
功能分析
Type: OpenClaw Skill
Name: a-stock-holding-monitor
Version: 1.0.0
The skill is a legitimate stock monitoring tool for A-shares that fetches real-time data from Sina Finance APIs. The code in `holding_monitor.py` performs price checks against user-defined thresholds (stop-loss, support, etc.) and outputs alerts without any evidence of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name/description (A股持仓监控) match the code and SKILL.md. The script only needs network access to Sina finance endpoints to fetch quotes and compute stop-loss/support/target signals—these requirements are proportional to the stated purpose.
Instruction Scope
SKILL.md instructs the user to edit the HOLDINGS list, make the script executable, and run it (manually or via cron). The runtime instructions do not request unrelated files, environment variables, or external endpoints beyond the Sina finance APIs the script uses. The script writes a state file to /tmp/holding_check.json (expected for local monitoring).
Install Mechanism
No install spec; this is instruction-only with an included Python script. No remote downloads, package installs, or archive extraction are performed by the skill itself, so installation risk is low.
Credentials
The skill declares no required environment variables and the code does not access any credentials or secret-bearing env vars. This is appropriate for a local monitor that only fetches public market data.
Persistence & Privilege
The skill is not always-enabled and does not request elevated privileges or modify other skills or system-wide configurations. It only writes a local /tmp JSON status file and exits with meaningful return codes (0/2).
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install a-stock-holding-monitor - 安装完成后,直接呼叫该 Skill 的名称或使用
/a-stock-holding-monitor触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of a-stock-holding-monitor
- Monitors A股 stock holdings for stop-loss, support breakdown, target prices, and abnormal fluctuations.
- Provides real-time alerts when preset conditions are triggered (stop-loss, support break, target reached, price anomaly).
- Calculates floating profit/loss and tracks deviation rate.
- Logs and outputs actionable suggestions.
- Designed to run manually or on a schedule using cron.
- Easy configuration via editing the HOLDINGS list in the script.
元数据
常见问题
A Stock Holding Monitor 是什么?
A股持仓监控脚本。监控持仓股票的止损/支撑破位/目标价/异常波动,触发条件时提醒。适合配合cron定时运行。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 83 次。
如何安装 A Stock Holding Monitor?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install a-stock-holding-monitor」即可一键安装,无需额外配置。
A Stock Holding Monitor 是免费的吗?
是的,A Stock Holding Monitor 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
A Stock Holding Monitor 支持哪些平台?
A Stock Holding Monitor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 A Stock Holding Monitor?
由 jdvrommel(@jdvrommel)开发并维护,当前版本 v1.0.0。
推荐 Skills