
watchdog[1] 是一个监控基金实时估值的命令行工具,可配合系统计划任务定时执行。
./watchdog -c test.yaml [--verbose] [--watch-now]
$ crontab -l
* * * * * /path/to/watchdog -c /path/to/test.yaml >> /path/to/test.log 2>&1
配置文件样例:
funds:
008099:# 基金代码
cost:1.6078# 基金成本价
000083:
cost:5.1727
token:
lark:xxxxxx# 飞书机器人 Webhook token,可选
dingtalk:xxxxxx# 钉钉机器人 Webhook token,可选
输出内容样例:
2025-08-22 21:48:03
上证指数:3825.76 54.66 🔺1.45%
沪深300:4378.00 89.93 🔺2.10%
深证成指:12166.06 246.30 🔺2.07%
创业板指:2682.55 87.08 🔺3.36%
000083|汇添富消费行业混合
成本:5.1727
估值:5.1458 🔺0.70% -0.52% 15:00
净值:5.1480 🔺0.74% -0.48% 2025-08-22
008099|广发价值领先混合A
成本:1.6078
估值:1.5244 ▼ -1.01% -5.19% 15:00
净值:1.5222 ▼ -1.16% -5.32% 2025-08-22
参考资料
[1]
watchdog: https://github.com/AlphaHinex/go-toolkit/tree/main/watchdog
[2]
watchdog_darwin_amd64: https://github.com/AlphaHinex/go-toolkit/releases/download/v2.6.0/watchdog_darwin_amd64
[3]
watchdog_darwin_arm64: https://github.com/AlphaHinex/go-toolkit/releases/download/v2.6.0/watchdog_darwin_arm64
[4]
watchdog_linux_amd64: https://github.com/AlphaHinex/go-toolkit/releases/download/v2.6.0/watchdog_linux_amd64
[5]
watchdog_linux_arm64: https://github.com/AlphaHinex/go-toolkit/releases/download/v2.6.0/watchdog_linux_arm64
[6]
watchdog_win_amd64.exe: https://github.com/AlphaHinex/go-toolkit/releases/download/v2.6.0/watchdog_win_amd64.exe