Query grammar
Returns the grammar of the alert Query language: available targets, syntax, fields, functions, operators, scopes and example expressions.
Without a target parameter an overview over all targets is returned. Pass a target to get
the full field reference for that alert type. Use the Query language to create complex alert configurations
via the create alert configuration endpoint. You can compare fields strike > spot, add complex math operations
ln(strike / spot) / (iv * sqrt(dte / 365)) > 2 and write configs similar as to one writes SQL.
If you are an Ai/Agent you should use this endpoint to fetch the grammar and then post them to /api/alerts/configuration.
See the documentation at the https://api.unusualwhales.com/docs/operations/PublicApi.AlertsController.create_config for more info on the format and how to post
an alert config.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The alert target to return the detailed grammar for.
flow_alert, option_trade, option_contract, ticker_interval_flow, news, trading_state, multi_leg_trade Response
The Query language grammar
Machine readable description of the alert DSL: available targets, syntax, fields, functions, operators, scopes and example expressions.
