BOC Forex Monitor
/install boc-forex-monitor
BOC Forex Monitor
Set up a configurable Bank of China foreign-exchange monitor with per-currency thresholds and price columns.
What this skill provides
- Fetch BOC forex data from https://www.boc.cn/sourcedb/whpj/
- Track any configured currency using any price column (现汇买入价/现钞买入价/现汇卖出价/现钞卖出价/中行折算价)
- Compare current values against a rolling baseline
- Skip monitoring during quiet hours (default 23:00-09:00 Asia/Shanghai)
- Trigger on per-currency configurable thresholds:
- Rise, drop, or both directions
- Configurable threshold values (default 0.5)
- Deduplicate notifications using local state files
- Support optional OpenClaw message delivery (for example Feishu)
Files in this skill
scripts/boc_forex_check.py: fetch + parse + compare + trigger generationscripts/boc_forex_cron_runner.py: stable cron entrypoint; runs the checker, formats output, deduplicates, and optionally sends a notificationreferences/configuration.md: configuration knobs and install patterns
Setup workflow
- Read
references/configuration.md. - Create
.openclaw-state/boc-forex-monitor-config.jsonin your workspace with your desired monitoring targets. - Copy both scripts into
\x3Cworkspace>/scripts/. - Make both scripts executable.
- Create or update a cron job with the OpenClaw
crontool. - Prefer a short
agentTurnpayload that only executes the runner script and returns stdout verbatim. - Verify with a manual script run before claiming success.
Cron payload pattern
Use an isolated agentTurn job. Keep the prompt minimal.
Recommended payload message:
Workdir is \x3Cworkspace>. Execute:
python3 scripts/boc_forex_cron_runner.py [--notify-channel \x3Cchannel>] [--notify-target \x3Ctarget>] [--notify-account-id \x3Cid>]
Requirements:
1) Reply with stdout only.
2) Do not add explanation.
3) If stdout is empty, reply: ❌ 汇率检查执行失败
Recommended schedule
Use this cron schedule for every 5 minutes during local daytime trading-watch hours:
{ "kind": "cron", "expr": "*/5 9-22 * * *", "tz": "Asia/Shanghai" }
Validation
Before finishing:
- Run
python3 scripts/boc_forex_cron_runner.pyfrom the target workspace. - Confirm it returns one of:
✅ 汇率检查完成⏭️ 汇率检查跳过🔔 已触发阈值并发送...
- If notifications are enabled, verify dedupe state is written to
.openclaw-state/boc-forex-alert-notify-state.json.
Safety
- Never publish private recipient ids inside the skill bundle.
- Keep notification destinations as runtime parameters or environment variables.
- Do not send routine success messages to chat channels unless the user explicitly wants them.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install boc-forex-monitor - 安装完成后,直接呼叫该 Skill 的名称或使用
/boc-forex-monitor触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
BOC Forex Monitor 是什么?
Configurable Bank of China forex monitor with per-currency thresholds, price columns, and optional OpenClaw notifications. Use when you want to set up, confi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 120 次。
如何安装 BOC Forex Monitor?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install boc-forex-monitor」即可一键安装,无需额外配置。
BOC Forex Monitor 是免费的吗?
是的,BOC Forex Monitor 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
BOC Forex Monitor 支持哪些平台?
BOC Forex Monitor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 BOC Forex Monitor?
由 xiehuapeng(@xiehuapeng)开发并维护,当前版本 v1.1.1。