Back to skills
extension
Category: Data & AnalyticsNo API key required

网页及指数变化监控

本地网页/ETF/指数变化监控。零token监控商品价格、票务、ETF指数涨跌、黄金,有变化时推送邮件或元宝通知。

personAuthor: user_1793b15chubcommunity

网页/指数/ETF 变化监控(省 token 版)v2.1

何时使用

  • "帮我盯一下这个商品价格 / 票务余量"
  • "监控某ETF,涨跌幅超过5%时通知我"
  • "盯一下上证指数,跌超3%提醒我"
  • 任何需要周期性比对网页或金融数据的场景

核心原理

本地脚本负责抓取+阈值判断+通知,LLM 全程不参与。

  • 无变化 / 未触发阈值 → 零 token,静默记录历史
  • 有变化 + 触发阈值 → 输出报告 + 推送邮件/元宝

支持品种一览

| 类型 | 品种 | 代码 | |------|------|------| | A股指数 | 上证指数 | sh000001 | | | 沪深300 | sh000300 | | | 上证50 | sh000016 | | | 中证500 | sh000905 | | | 中证1000 | sh000852 | | | 科创50 | sh000688 | | A股ETF | 沪深300ETF(华泰柏瑞) | sh510300 | | | 科创50ETF(华夏) | sh588000 | | | 创业板ETF(易方达) | sz159915 | | | 黄金ETF(华安) | sh518880 | | | 标普500ETF(博时) | sh513500 | | | 纳指ETF(广发) | sz159941 | | | 人工智能ETF | sh515980 |

代码前缀:sh=上海交易所 sz=深圳交易所 不确定代码?直接在腾讯财经/东方财富搜索名称,看URL里的代码


监控命令

# 添加监控(指数/ETF/黄金/股票均可)
python3 monitor.py etf add sh000001 --name "上证指数" --threshold 3
python3 monitor.py etf add sh000300 --name "沪深300" --threshold 5
python3 monitor.py etf add sh518880 --name "黄金ETF" --threshold 5
python3 monitor.py etf add sh510300 --name "沪深300ETF" --threshold 5

# 检查全部(阈值判断 + 通知触发)
python3 monitor.py check

# 列出任务
python3 monitor.py etf list

# 查看历史(可导入 Excel 画 K 线)
python3 monitor.py history <任务ID> --last 20

# 删除任务
python3 monitor.py remove <任务ID>

通知配置

# 邮件通知
python3 monitor.py config \
  --email your@email.com \
  --smtp-host smtp.gmail.com \
  --smtp-port 587 \
  --smtp-user you@gmail.com \
  --smtp-pass 你的授权码

# 查看/关闭元宝推送
python3 monitor.py config --show
python3 monitor.py config --no-yuanbao

普通网页监控

python3 monitor.py add https://shop.example.com --name "商品" \
  --field 价格:.price --field 库存:.stock
python3 monitor.py check

输出解读

·   [abc123] 上证指数  涨跌幅 +0.72%(阈值 ±3.0%,未触发)

→ 变化了但不通知,静默记录到历史。

🔔 [abc123] 黄金ETF  📉 -5.23%(阈值 ±5.0%,已触发)
    现价: 8.512 → 8.068
    涨跌幅: +0.87% → -5.23%
    涨跌额: +0.073 → -0.444
------------------------------------------
   🔔 已写入通知队列

→ 触发阈值,邮件+元宝同时推送。


数据位置

| 内容 | 路径 | |------|------| | 任务列表 | ~/.web-watch/jobs.json | | 历史数据 | ~/.web-watch/history/<id>.csv | | 通知队列 | ~/.web-watch/notifications/*.json | | 配置信息 | ~/.web-watch/config.json |


定时监控(OpenClaw Cron)

设置每小时自动跑 check,触发阈值才推通知:

# 每小时检查一次
python3 /root/.openclaw/workspace/skills/web-watch/monitor.py check