Docs / Actions & workflows
Rules and templates
when
drop5 >= 0.6 | A yes/no question is its probability (0–1); 60% also works. |
|---|---|
regime == 'bear' | A choice is the winning option. |
regime.bear > 0.5 | One option's probability. |
conviction >= 1.5 | A score is its expected level. |
a >= 0.7 and (b < 0.3 or not c >= 0.5) | and, or, not, parentheses; >= > <= < == !=. |
always | Every time, e.g. a daily digest. |
else | Only if no earlier rule (other than an else) fired. |
Rules are checked before anything runs: an unknown question, an option a choice doesn't have, or comparing text with a number is a 422 with the exact location.
Templates
message, subject and every string inside a webhook body can use placeholders:
{{drop5}} {{drop5|pct}} {{drop5|round}} | An answer: 0.734 · 73% · 0.73. {{regime}}, {{regime.bear|pct}}, {{drop5.confidence}}. |
|---|---|
{{symbol}} {{as_of}} | From state.symbol, state.as_of. |
{{state.context.rsi_14}} | Any state field by path. |
{{model}} {{action}} {{now}} {{answers}} | Model, action id, UTC time, all answers. |
In a webhook body, a string that is exactly one placeholder keeps its type: "p": "{{drop5}}" sends the number 0.734. With no body, a webhook gets {event, action, model, symbol, as_of, answers, sent_at}. With no message, Slack and email get a one-line summary of every answer.
Create an account Open the Playground
Everything here also lives in the console, next to your keys and usage.