AI Market Sentiment logo

Catalog action Utility

Classify a short text's sentiment toward a specific asset — a crypto coin OR a US stock ticker — with live market context (price, trend, crypto Fear & Greed, equity/cashtag identity) gathered automatically so the model resolves market-native rhetoric — 'inverse BTC', contrarian/fade language, cashtag proxies — against actual market direction. Subjects resolve via CoinGecko (crypto) with a Finnhub equity fallback for tickers like AAPL/NVDA. Runs on Caddie's task-graph runtime; the action is a signed proxy. Single LLM call, fixed structured output. Ideal for: tweet/headline-triggered trading workflows, sentiment-based alerts, contrarian signal detection. Drop-in replacement for an AI Prompt node doing sentiment classification — the failure mode it fixes is the model never seeing market state.

At a Glance

FieldValue
Action IDai-market-sentiment
CategoryUtility
ConnectorNot required
Requires gasNo
Funds movementNone declared
Tagsai, llm, sentiment, openrouter, utility, market, crypto, transform, text

Payload Schema

FieldTypeRequiredDescription
textstringYesThe content to classify (tweet, headline, news snippet, chat message). Pass in trigger output (e.g., {{root.result.text}} for an x-new-tweet trigger).
subjectstringYesThe asset(s) the sentiment is toward — a crypto coin (name, symbol, CoinGecko id, or contract address, e.g. 'BTC', 'bitcoin', '0xabc...') OR a US stock ticker (e.g. 'AAPL', 'MARA', 'NVDA'). Pass a COMMA-SEPARATED list (e.g. 'BTC,ETH,SOL' or 'AAPL, NVDA', up to 5) to classify each independently — results come back in 'subjects[]'. Each is resolved to a CoinGecko id for crypto; if not a coin, it falls back to a Finnhub equity quote. On a full miss, classification uses bare-text reasoning.
authorstringNoOptional author handle/byline (e.g., '@VitalikButerin'). Surface hint to the model only — v1 does not maintain a per-handle reputation map.
includeMarketContextbooleanNoMaster switch for the deterministic market-data gather phase. When false, the action runs as a bare-text sentiment classifier with no market fetches. Default: true.
additionalContextstringNoExtra context from prior workflow steps to pass to the model (same semantics as AI Prompt's 'context'). Stringify JSON if needed.
customGuidancestringNoOptional domain guidance appended to the system prompt (e.g., 'This account is known for sarcasm', 'Treat $MARA as a Bitcoin-correlated mining proxy'). Use sparingly — the prompt already covers crypto rhetoric (inverse, contrarian, cashtag proxies). TRUST NOTE: this is operator-authored guidance and is injected OUTSIDE the prompt-injection guard rail (unlike 'text'/'author'/'additionalContext'), so set it from workflow config — never wire untrusted user/tweet content into it.
modelstringNoThe OpenRouter model to use (default: 'anthropic/claude-haiku-4.5'). Any model id from the OpenRouter catalog is accepted. When unset, Caddie runs its configured classifier model.
temperaturenumberNoCreativity/randomness for the classification call. Default 0.2 — sentiment should be deterministic, not creative.
maxTokensnumberNoMaximum tokens in the response (default: 1024, max: 16384).

Result Schema

FieldTypeRequiredDescription
sentimentstringYesClassification toward the subject asset.
confidencenumberYesModel-reported confidence in the classification (0.0-1.0).
reasoningstringYesShort explanation of how the model resolved the text — including market direction usage when relevant.
marketContextobjectYesAudit trail of the deterministic gather phase. Echoes exactly what the model was shown so Run History is self-explanatory.
subjectsarrayNoPer-subject verdicts, one per resolved subject in input order. Length 1 for a single subject; one per ticker when 'subject' is comma-separated (e.g. 'BTC,ETH,SOL'). The top-level sentiment/confidence/reasoning/marketContext mirror subjects[0]. Index subjects[i] to branch per ticker.
modelstringNoThe OpenRouter model that produced the classification.
usageobjectNoOpenRouter token usage for the classification call.

Examples

json
{ "type": "ai-market-sentiment", "payload": { "text": "Workflow completed", "subject": "example-subject" }, "children": []}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.