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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| action | Yes | ||
| period | No | 2y | |
| series | No | ||
| ticker | Yes | ||
| condition | Yes | ||
| indicators | No |