name: webhooks description: “支持HMAC签名和速率限制的Webhook管理” commands:
- /webhooks
- /webhook
Webhooks
注册、管理和检查传入的Webhook端点,支持可选的HMAC-SHA256签名验证。
命令
/webhooks list - 列出所有已注册的Webhook
/webhooks register <id> <path> - 注册一个Webhook端点
/webhooks register <id> <path> --secret <key> - 使用HMAC密钥注册
/webhooks unregister <id> - 移除一个Webhook
/webhooks enable <id> - 启用一个Webhook
/webhooks disable <id> - 禁用一个Webhook
/webhooks get <id> - 查看Webhook详情
示例
/webhooks list
/webhooks register trade-signals /hooks/trades
/webhooks register alerts /hooks/alerts --secret mysecretkey
/webhooks get trade-signals
/webhooks disable trade-signals
/webhooks enable trade-signals
/webhooks unregister trade-signals
Webhook详情
/webhooks get <id> 命令显示:
- Webhook监听的路径
- 描述(如果已设置)
- 启用/禁用状态
- 是否配置了HMAC密钥
- 总触发次数
安全
Webhooks支持HMAC-SHA256负载验证。注册时传递 --secret <key> 以启用对传入请求的签名验证。