a-stock-holding-monitor

A股持仓监控脚本。监控持仓股票的止损/支撑破位/目标价/异常波动,触发条件时提醒。适合配合cron定时运行。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "a-stock-holding-monitor" with this command: npx skills add jdvrommel/a-stock-holding-monitor

A股持仓监控脚本

监控A股持仓的止损、支撑、目标价和异常波动。

功能

  • 实时获取持仓股票现价
  • 检测是否触及止损/支撑/目标位
  • 计算浮盈/浮亏
  • 乖离率超5%警告
  • 当日跌幅超5%异动告警

触发条件

条件标记操作建议
触及止损价🔴建议止损
跌破支撑位🟠关注是否企稳
当日跌幅>5%🔴异动告警
乖离率>+5%⚠️短线过热

文件

  • holding_monitor.py - 主程序

安装

  1. 下载脚本
  2. 修改脚本顶部的 HOLDINGS 列表,填入你的持仓
  3. 设置执行权限: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
  • 止损和支撑位需要根据个人风险承受能力设置
  • 建议配合飞书/微信机器人实现推送通知

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

fund-monitor

基金监控Skill - 获取基金净值、涨跌数据,支持批量查询和监控

Registry SourceRecently Updated
5730Profile unavailable
Research

Stock Monitor Pro

全功能智能股票监控预警系统。支持成本百分比、均线金叉死叉、RSI超买超卖、成交量异动、跳空缺口、动态止盈等7大预警规则。符合中国投资者习惯(红涨绿跌)。

Registry SourceRecently Updated
2471Profile unavailable
Web3

Stock Analysis

Use when analyzing stocks or cryptocurrencies with public market data, comparing tickers, and producing structured notes for a portfolio or watchlist.

Registry SourceRecently Updated
850Profile unavailable
Web3

Stock Monitor

Use when building a manual stock watchlist, defining alert thresholds, or documenting a repeatable monitoring routine with public market data.

Registry SourceRecently Updated
850Profile unavailable