Skip to main content

Triggers (Conditions + Indicators)

In Auto, a trigger is a condition tree that evaluates continuously. When the tree resolves to true, configured actions run.

Market Coverage

Auto monitors the full Elfa symbol universe — crypto spot and perps, plus tokenised equities, commodities, and FX listed as HIP-3 markets on Hyperliquid. See Symbols for asset classes, examples, and how to verify a specific ticker.

price and ta conditions select their data venue via the required exchange arg (hyperliquid or gmx). See Exchange Argument (price / ta).

Trigger Shape

All triggers are expressed as conditions with a root boolean group:

{
"conditions": {
"AND": [
{
"source": "ta",
"method": "rsi",
"args": { "symbol": "BTC", "timeframe": "1h", "period": 14 },
"operator": "<",
"value": 30
}
]
}
}

Rules:

  • Root group must be AND or OR.
  • Groups can be nested.
  • Max condition tree depth: 3.
  • Max leaf conditions per query: 10.

Supported Condition Sources

Price Source (price)

MethodArgumentsReturnsDescription
currentsymbol, exchangenumberCurrent market price
changesymbol, period, exchangenumberPercent price change over period
highsymbol, period, exchangenumberHighest price in period
lowsymbol, period, exchangenumberLowest price in period
volumesymbol, period, exchangenumberVolume in USD over period

exchange is required on all price methods — see Exchange Argument (price / ta).

TA Source (ta) - Indicator Methods

Indicator methodArgumentsReturnsDescription
rsisymbol, timeframe, period?, exchangenumberRSI (0-100), default period=14
macd_valuesymbol, timeframe, exchangenumberMACD line value
macd_signalsymbol, timeframe, exchangenumberMACD signal line
macd_histogramsymbol, timeframe, exchangenumberMACD histogram
bbands_uppersymbol, timeframe, period?, exchangenumberUpper Bollinger Band
bbands_middlesymbol, timeframe, period?, exchangenumberMiddle Bollinger Band
bbands_lowersymbol, timeframe, period?, exchangenumberLower Bollinger Band
emasymbol, timeframe, period, exchangenumberExponential moving average
smasymbol, timeframe, period, exchangenumberSimple moving average
atrsymbol, timeframe, period?, exchangenumberAverage true range
stoch_ksymbol, timeframe, exchangenumberStochastic %K
stoch_dsymbol, timeframe, exchangenumberStochastic %D
ccisymbol, timeframe, period?, exchangenumberCommodity Channel Index
willrsymbol, timeframe, period?, exchangenumberWilliams %R

exchange is required on all ta methods — see Exchange Argument (price / ta).

Signal Source: X/Twitter Post (tweet)

In the builder catalog, this appears in the Signal category as X/Twitter Post.

MethodArgumentsReturnsDescription
semanticusername, text, minConfidencebooleanMatches posts from a specific X/Twitter account when semantic confidence meets threshold

Notes:

  • username should be passed without @ (for example cz_binance).
  • username must resolve to an active monitored account, otherwise validation/create fails.
  • minConfidence must be an integer from 0 to 100.

Default condition shape:

{
"source": "tweet",
"args": {
"username": "cz_binance",
"text": "Binance Alpha is listing a new token",
"minConfidence": 80
}
}

Signal Source: Event (news)

In the builder catalog, this appears in the Signal category as Event.

MethodArgumentsReturnsDescription
semantictext, minConfidencebooleanMatches event-like mentions from news-tagged sources when semantic confidence meets threshold

Notes:

  • Event matching is based on news-tagged sources.
  • minConfidence must be an integer from 0 to 100.

Default condition shape:

{
"source": "news",
"args": {
"text": "SEC approves a spot ETH ETF",
"minConfidence": 80
}
}

TA Args Contract

This is the exact args contract validated by Athena for TA methods.

Every method below also requires an exchange:string arg (hyperliquid or gmx). It is listed under required args for each method — see Exchange Argument (price / ta).

MethodRequired argsOptional argsNotes
rsisymbol:string, timeframe:string, exchange:stringperiod:number (default 14)period is optional.
macd_valuesymbol:string, timeframe:string, exchange:stringNoneUses MACD defaults internally.
macd_signalsymbol:string, timeframe:string, exchange:stringNoneUses MACD defaults internally.
macd_histogramsymbol:string, timeframe:string, exchange:stringNoneUses MACD defaults internally.
bbands_uppersymbol:string, timeframe:string, exchange:stringperiod:number (default 20)period is optional.
bbands_middlesymbol:string, timeframe:string, exchange:stringperiod:number (default 20)period is optional.
bbands_lowersymbol:string, timeframe:string, exchange:stringperiod:number (default 20)period is optional.
emasymbol:string, timeframe:string, period:number, exchange:stringNoneperiod is required.
smasymbol:string, timeframe:string, period:number, exchange:stringNoneperiod is required.
atrsymbol:string, timeframe:string, exchange:stringperiod:number (default 14)period is optional.
stoch_ksymbol:string, timeframe:string, exchange:stringNoneNo period argument in EQL.
stoch_dsymbol:string, timeframe:string, exchange:stringNoneNo period argument in EQL.
ccisymbol:string, timeframe:string, exchange:stringperiod:number (default 20)period is optional.
willrsymbol:string, timeframe:string, exchange:stringperiod:number (default 14)period is optional.

Exchange Argument (price / ta)

Both price and ta conditions require an exchange arg that selects which venue's market data backs the condition.

PropertyValue
Arg nameexchange
Typestring
RequiredYes
Allowed valueshyperliquid, gmx

Use it to read the same indicator from a different venue — for example, evaluate RSI on gmx rather than hyperliquid.

{
"source": "price",
"method": "low",
"args": { "symbol": "BTC", "period": "1h", "exchange": "gmx" },
"operator": "<",
"value": 98000
}
{
"source": "ta",
"method": "rsi",
"args": { "symbol": "BTC", "timeframe": "1h", "period": 14, "exchange": "hyperliquid" },
"operator": "<",
"value": 30
}

Notes:

  • exchange only affects the data source of a price/ta condition. It is independent of where market_order / limit_order actions execute (those carry their own required exchange param — see Trading Execution).
  • Use the exact lowercase enum values (hyperliquid or gmx).

Validation Errors → Next Action

When Validate Query or Create rejects a query, the error is almost always a phrasing issue — not a capability gap. Iterate on Validate instead of abandoning the query.

Error signalWhat it meansNext action
EQL_MISSING_ARGA required arg is absent (e.g. period on ema/sma).Check TA Args Contract, add the missing arg, re-validate.
EQL_INVALID_ARG / type errorsWrong type (e.g. "14" instead of 14) or unrecognized key (e.g. length vs period).Use the exact key names and JSON numeric types from the contract table.
Unknown methodIndicator name not supported.Pick the nearest supported method from TA Source; ask Builder Chat to substitute.
Unsupported timeframe / periodValue outside the enum.Snap to the nearest allowed value — see Timeframe and Period Enums.
Unsupported symbol / sourceAsset not indexed or DEX pair unsupported.Skip that symbol and report it; proceed with the supported subset (see capabilities prompt pack for the "skip unsupported" pattern).
Unmonitored tweet usernametweet.semantic account is not in monitored active account set.Replace with a monitored active handle and re-validate.
Invalid minConfidence (tweet/news)Confidence is non-integer or outside 0..100.Use an integer between 0 and 100 (start with 80).
Depth / leaf-count exceededMore than depth 3 or 10 leaves.Split into two queries joined by your runner, or factor shared conditions out.
cron / llm period too shortBelow 1h minimum.Raise to 1h or higher — see Scheduling Period.
Dynamic value in action paramsDynamic values only allowed in condition value.Move the dynamic reference into a condition; keep action params literal.

General rule: if Validate returns an error, reshape and re-validate in a loop — do not create your own monitoring stack. See also If /auto doesn't fit.

Common TA Arg Errors

  • ema and sma require period; length is not a recognized alias.
  • period must be a JSON number (for example 14), not a string ("14").
  • timeframe is required for all TA methods.

Invalid EMA example (length used, period missing):

{
"source": "ta",
"method": "ema",
"args": { "symbol": "BTC", "timeframe": "1h", "length": 20 },
"operator": ">",
"value": 100000
}

Expected validation failure:

  • EQL_MISSING_ARG for period on method ema

Valid EMA example:

{
"source": "ta",
"method": "ema",
"args": { "symbol": "BTC", "timeframe": "1h", "period": 20 },
"operator": ">",
"value": 100000
}

Cron Source (cron)

MethodArgumentsReturnsDescription
onceperiodbooleanTrue on first due evaluation at/after createdAt + period
onceRemainTrueperiodbooleanTrue on first due evaluation and remains true afterward
everyperiodbooleanTrue at each period interval from query creation

LLM Source (llm)

MethodArgumentsReturnsDescription
athena_conditionquery, period, speed?booleanLLM-evaluated condition

Note:

  • cron, llm, tweet, and news support shorthand forms and are expanded server-side.
  • period for cron and llm sources has a minimum of 1h. See Scheduling Period (cron / llm) for the allowed set.
  • For clearer runtime semantics and easier debugging, prefer separate queries for event-driven Signal intents (tweet/news) and recurring schedule intents (cron.every).

Supported Operators

  • >
  • <
  • >=
  • <=
  • ==
  • !=
  • crosses_above
  • crosses_below

Cross operators use previous-state tracking and evaluate transitions:

  • crosses_above: previous < threshold and current >= threshold
  • crosses_below: previous > threshold and current <= threshold

Dynamic Comparisons (Dynamic Values)

value does not need to be a static literal. It can also reference another data source result at evaluation time.

This lets you compare one live metric against another live metric, for example current price vs. an indicator band.

Example: trigger when ETH price crosses above the current 4h upper Bollinger Band.

{
"conditions": {
"AND": [
{
"source": "price",
"method": "current",
"args": { "symbol": "ETH" },
"operator": "crosses_above",
"value": {
"source": "ta",
"method": "bbands_upper",
"args": { "symbol": "ETH", "timeframe": "4h" }
}
}
]
}
}

Important:

  • Dynamic values are supported only in condition value.
  • Dynamic values are not supported in action parameters.

Timeframe and Period Enums

TA timeframe values:

  • 1m, 5m, 15m, 30m, 1h, 2h, 4h, 8h, 12h, 1d

period values for price args and TA indicator lookbacks:

  • 1h, 2h, 4h, 8h, 12h, 24h, 1d, 7d

Scheduling Period (cron / llm)

For cron and llm sources, period is a scheduling interval with a minimum of 1h.

Allowed values:

  • 1h, 2h, 4h, 8h, 12h, 24h, 1d, 7d

Signal Match-Description Guidance

For X/Twitter Post and Event, write args.text as a short factual claim.

X/Twitter Post examples:

  • bad: Bearish vibes -> good: Opens a short position on oil
  • bad: Something bullish -> good: Announces a new stake in TSLA
  • bad: Bullish on a coin -> good: Posts that they're bullish on $HYPE and $SOL

Event examples:

  • bad: Market crash -> good: Major DeFi protocol suffers a $200M exploit
  • bad: War conflict -> good: US imposes new sanctions on Russia
  • bad: Big news -> good: SEC approves a spot ETH ETF