← Back to Skills Marketplace
83
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install a-stock-holding-monitor
Description
A股持仓监控脚本。监控持仓股票的止损/支撑破位/目标价/异常波动,触发条件时提醒。适合配合cron定时运行。
README (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
- 止损和支撑位需要根据个人风险承受能力设置
- 建议配合飞书/微信机器人实现推送通知
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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).
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install a-stock-holding-monitor - After installation, invoke the skill by name or use
/a-stock-holding-monitor - Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Frequently Asked Questions
What is A Stock Holding Monitor?
A股持仓监控脚本。监控持仓股票的止损/支撑破位/目标价/异常波动,触发条件时提醒。适合配合cron定时运行。 It is an AI Agent Skill for Claude Code / OpenClaw, with 83 downloads so far.
How do I install A Stock Holding Monitor?
Run "/install a-stock-holding-monitor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is A Stock Holding Monitor free?
Yes, A Stock Holding Monitor is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does A Stock Holding Monitor support?
A Stock Holding Monitor is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created A Stock Holding Monitor?
It is built and maintained by jdvrommel (@jdvrommel); the current version is v1.0.0.
More Skills