OPENCLAW_WS_TOKEN(由网页申请得到)npm install -g openclaw-glance-pluginproductCode: 产品代码productType: 市场类型 (stock/index/hk_stock/crypto)condition: 条件表达式variables: 变量值ws://glanceup-pre.100credit.cn)只有在用户明确表达以下意图时调用插件:
调用前必须确认:
productCode(标的代码)productType(stock/index/hk_stock/crypto)condition(规则表达式)variables(阈值变量)缺任一项时先追问,不要猜测阈值。
openclaw 渠道必传,email / call 可选。如用户没明确说明使用邮件(email)、电话/外呼(call) 通知提醒,则只需要传入openclaw 渠道。
to_address:收件人邮箱(必填)template_id:邮件模板 ID(必填,默认为4,不需要修改)template_params:模板变量(可选)示例:
emailConfig: {
to_address: 'demo@example.com',
template_id: 4,
template_params: {
title: '监控提醒',
product_name: '比特币'
}
}
phone:手机号(必填)customer_name:客户名称(可选)condition:外呼内容(可选,默认用触发消息,如不需要自定义可使用默认消息)示例:
callConfig: {
phone: '13800138000',
customer_name: 'Demo',
condition: '比特币价格突破阈值'
}
| 市场 | productType | 示例 | 说明 |
|---|---|---|---|
| ------ | ------------- | ------ | ------ |
| A股个股 | stock | 000001 | 每3秒行情 |
| A股指数 | index | 000300 | 每3秒行情 |
| 港股 | hk_stock | 00700 | 延迟15分钟 |
| 加密货币 | crypto | BTCUSDT | 每10秒行情 |
意图映射建议:
indexhk_stockcryptostock 处理并在必要时追问确认详细产品代码见 references/markets.md
// 条件: 价格 >= 73000 且涨幅 >= 1%
condition: 'price >= threshold and change_percent >= cp_threshold'
variables: { threshold: 73000, cp_threshold: 0.01, product_name: 'Bitcoin' }
// 注意: crypto 不支持 turnover_rate
// 条件: 价格 >= 12.5 且换手率 >= 1%
condition: 'price >= threshold and turnover_rate >= tr_threshold'
variables: { threshold: 12.5, tr_threshold: 0.01, product_name: '平安银行' }
// 条件: 价格 >= 420
condition: 'price >= threshold'
variables: { threshold: 420, product_name: '腾讯控股' }
当监控触发时:
market_data 获取价格、涨跌幅等信息openclaw 渠道必传,email/call 可按需附加如果创建失败(watch.create.result.success=false):
共 1 个版本