create_hook
Save a condition hook so a JSON event is delivered to a file or allowed webhook whenever the condition fires on a new bar. Analysis alerts only; nothing is traded.
Instructions
Save a condition hook: when the condition fires on a new bar, a JSON event is delivered.
action: {"type": "file", "target": "alerts_name"} appends JSON lines on the server, or {"type": "webhook", "target": "https://..."} posts JSON (only to prefixes the operator allowed). Past events are not replayed. Hooks are evaluated by run_hooks or the broker-analysis-hooks command (schedule it with cron). Analysis alerts only: nothing is ever traded.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"ticker": "<ticker>",
"condition": "<condition>",
"action": "<action>"
},
"name": "create_hook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| action | Yes | ||
| period | No | 2y | |
| series | No | ||
| ticker | Yes | ||
| condition | Yes | ||
| indicators | No |