- OKX交易自动化 (okx-auto-position, okx-crypto, okx-exchange) - 交易信号处理 (signal-confirmation-templates, trading-signal-aggregator) - 量化因子挖掘 (quant-factor-mining) - 长桥集成 (longbridge-cli, longbridge-python-sdk) - 六合彩分析 (lottery-hk) - 股息投资 (dividend-investing, dividend-scanner) - 日内交易 (intraday-trading) - 同花顺 (tonghuashun)
1.3 KiB
1.3 KiB
Channel Prompts 信号处理配置
位置
~/.hermes/config.yaml 中有4处相同的prompt(telegram/discord/mattermost各一处 + 顶层一处)。
当前prompt逻辑(2026-06-25更新)
第一步:消息分类
A) 交易信号 — 含币种名称、方向、仓位
B) 确认/取消 — Y/确认/ok/N/取消
C) 平仓信号 — 平仓/止盈/止损/close
D) 非交易消息 — 广告/闲聊/图片/表情 → 忽略
第二步:按类型处理
A类 → trade_signal_handler.py signal → trade_notifier.py notify
B类 → confirm/cancel
C类 → okx_position_advisor.py --close
D类 → 不做任何操作
编辑注意事项
- 不能用patch工具直接编辑config.yaml(安全策略保护)
- 不能用yaml.dump整体重写(会破坏格式/丢注释/改版本号)
- 必须用terminal + Python regex替换:
import re with open('/home/openclaw/.hermes/config.yaml', 'r') as f: content = f.read() new_content, count = re.subn(old_pattern, new_prompt, content) with open('/home/openclaw/.hermes/config.yaml', 'w') as f: f.write(new_content) - 替换后需要重启gateway才能生效(从外部shell执行)
群ID
- 交易信号群:
-1003966251111 - 配置了
free_response_channels和free_response_chats