Create alert configuration
Creates a new alert configuration, or updates an existing one when id is given.
The alert filters can be given in one of two ways, but never both:
config: a structured filter object for the givennoti_type, the same configuration as returned by the alert configurations endpoint.input: a Query language expression. Use the Query language for complex filter expressions.
Before creating an alert fetch the available filters:
GET /api/alerts/filterslists per alert type (noti_type) the filter fields that can be used inconfig, their accepted values, and whether your account can create alerts of that type.GET /api/alerts/query/grammarreturns the Query language syntax.GET /api/alerts/query/grammar?target=option_tradethe full field reference for one target.
Example with a structured config:
Example with a Query language input:
The created alerts are delivered like the alerts created on https://unusualwhales.com/custom-alerts
and their triggers can be fetched from the alerts endpoint or streamed over the custom_alerts websocket channel.
The alerts and usage of the websocket are the easiest way to setup and get notified on anything that matches your filter configs. The query language is a powerful tool to create complex configurations in a SQL like language.
Authorizations
Body
Alert configuration
- Create alert config request
- Create alert config request
Creates a new alert configuration, or updates an existing one when id is given.
The alert filters can be given in one of two ways, but never both:
config: a structured filter object for the givennoti_type. Fetch the available filter fields per alert type fromGET /api/alerts/filters.input: a DSL expression such asadd @energy where calls and volume > 100. Fetch the DSL grammar fromGET /api/alerts/query/grammar. Thenoti_typefield is required for DSL expressions.
