Salta ai contenuti

/notifications

Cosa fa. Riepiloga gli alert attivi oppure l’intero storico delle notifiche.

Quando usarlo. Per rivedere cosa è scattato.

Argomenti. TICKER | news | history (optional)

Esempio. /notifications history

Cosa restituisce. Lo stato degli alert attivi o la cronologia delle notifiche.

Quando lanci /notifications, Dexter non esegue codice fisso: invia all’AI la prompt qui sotto — il segnaposto {arg} viene sostituito con ciò che scrivi dopo il comando — e l’agente la esegue chiamando da sé gli strumenti necessari. Vedi Come funzionano i comandi per le convenzioni comuni (chiamate in parallelo, anti-allucinazione, fasi, widget di chiusura).

Strumenti che può usare: get_user_notifications, get_news_feed, get_crypto_snapshot, get_stock_performance, get_technical_indicators, get_future_profile, get_stock_prices_intraday, get_fund_profile, get_crypto_prices, get_crypto_prices_intraday, get_crypto_technical_indicators, get_key_ratios, get_crypto_metadata, web_search, get_stock_prices, get_income_statements.

È la prompt esatta inviata all’AI quando usi il comando (sostituendo {arg}).

/notifications arg: "{arg}"
HARD RULE: every mode STARTS with its listed tool calls — NEVER answer from memory.
Tool limit: get_user_notifications accepts limit <= 100 (higher values FAIL validation).
--- PARSE ---
Determine the mode from "{arg}":
- Contains "news" → MODE 5 (news notifications only). A ticker next to it → filter that ticker.
- Contains "history": history=true. If a ticker is also present → ticker=that_ticker.
- Is a ticker (1-6 uppercase letters, possibly .DE/.MI): ticker=that_ticker, history=false.
- Empty or "{arg}": ticker=none, history=false (MODE 1).
--- 5 MODES ---
## MODE 1: /notifications (no ticker, no history) — full bell overview: alerts + news
If ticker=none AND history=false:
1. get_user_notifications(kind="all", limit=50)
2. ALERTS: filter alert_is_active=true. Group by ticker. For each: condition type, trigger vs threshold, message, timestamp.
If expired/consumed notifications exist, compact line "X additional expired notifications" at bottom (no details).
3. NEWS (favorited tickers): unread first — Ticker, title, publisher, when. If more than 10, show the 10 most recent + total count.
4. If both empty: state it; suggest /set-alert TICKER for alerts and the ★ favorites in Explorer for news notifications.
## MODE 5: /notifications news [TICKER] — news notifications only
1. get_user_notifications(kind="news", limit=50) — filter by ticker if one was given.
2. Table: Date | Ticker | Title | Publisher | Read. Unread first.
3. If one ticker accumulated 3+ notifications, call get_news_feed(tickers=that_ticker, days=7, limit=10)
and summarize the news cluster in 2-3 lines (what is happening and why it matters).
## MODE 2: /notifications TICKER (no history) — ACTIVE alerts for ONE ticker, DEEP analysis
If ticker present AND history=false:
1. get_user_notifications(kind="alerts", limit=100) → filter by ticker + alert_is_active=true.
2. If zero active alerts for this ticker: state it, but proceed with analysis (step 3).
3. Detect asset type — in order:
- IS_FUTURE: ticker ends with "=F" (GC=F, CL=F, ES=F, ZN=F, etc.)
- IS_FOREX: ticker ends with "=X" (EURUSD=X, GBPUSD=X, etc.)
- IS_FUND: known mutual fund tickers (VFIAX, FXAIX, VTSAX, VBTLX, FZROX, PRGFX, VTIAX, VEIRX)
- IS_INDEX: ticker starts with "^" (^GSPC, ^IXIC, ^DJI, etc.)
- IS_CRYPTO: obvious crypto symbol (BTC, ETH, SOL, BNB, XRP, ADA, DOGE, AVAX, etc.)
or try get_crypto_snapshot(symbol=ticker) — if it returns price data → IS_CRYPTO=true
- IS_STOCK/ETF: everything else
IN PARALLEL:
IF IS_FUTURE: get_stock_performance, get_technical_indicators(limit=3), get_future_profile,
get_stock_prices_intraday(interval="1h", limit=16)
IF IS_FOREX: get_stock_performance, get_technical_indicators(limit=3),
get_stock_prices_intraday(interval="1h", limit=16)
IF IS_FUND: get_stock_performance, get_fund_profile,
get_stock_prices_intraday(interval="1h", limit=16)
IF IS_INDEX: get_stock_performance, get_technical_indicators(limit=3),
get_stock_prices_intraday(interval="1h", limit=16)
IF IS_CRYPTO: get_crypto_snapshot, get_crypto_prices(interval="day", limit=30),
get_crypto_prices_intraday(interval="1h", limit=24), get_crypto_technical_indicators
IF IS_STOCK/ETF: get_stock_performance, get_technical_indicators(limit=3), get_key_ratios,
get_news_feed(tickers=TICKER, days=7, limit=10), get_stock_prices_intraday(interval="1h", limit=16)
4. For EACH active alert, cross-reference with current data:
- What does the condition mean in current context? Current value distance from threshold?
- Use intraday hourly bars to assess: is price trending toward or away from the threshold? Estimated time to trigger at current pace?
- Is the alert aligned with technicals? (e.g. PRICE_ABOVE + RSI overbought = coherent)
- Recently triggered alert (<24h): false alarm or valid signal?
5. Synthesis: what story do these alerts collectively tell? Clusters around a specific thesis (breakout, breakdown, range-bound, reversal)?
6. Output:
### {TICKER} — Active Alerts
[Price, RSI, MACD, vs SMA20/50, 52w position — max 2 lines]
🔴/🟡/🟢 **{condition}**: trigger at {threshold} vs current {value} → [1-line assessment]
### Synthesis
[2-3 sentences: what alerts suggest, opportunity or risk, what to watch]
### Recommendations
[1-2 actionable suggestions: modify thresholds? new alerts? critical price levels?]
## MODE 3: /notifications history (no ticker) — ALL notifications
If ticker=none AND history=true:
1. get_user_notifications(kind="all", limit=100)
2. Split alerts: 🟢 ACTIVE (alert_is_active=true) vs ⚫ EXPIRED (alert_is_active=false or notify_once consumed).
News notifications: separate compact section (Date | Ticker | Title), newest first.
Group by ticker. For each notification: condition, trigger vs threshold, timestamp.
3. Pattern analysis:
- Alert frequency per ticker | Most frequent condition types
- Clusters: multiple alerts on same ticker in short windows?
- Prone to false positives (trigger then price moves opposite)
4. If "{arg}" contains extra instructions beyond "history", follow them (e.g. "history RSI only" → filter).
5. Output:
### Notifications Overview
Total: X (Y active, Z expired) | Tickers: N
### Active Alerts
| Ticker | Condition | Threshold | Current | Since |
### Recent History (30 days)
| Ticker | Condition | Triggered At | Status |
### Patterns & Insights
[Frequency, trigger types, clusters, false positives]
### Recommendations
[Threshold adjustments, tickers to watch, alerts to disable if too noisy]
## MODE 4: /notifications TICKER history — ALL alerts for ONE ticker, DEEP patterns
If ticker present AND history=true:
1. get_user_notifications(kind="all", limit=100) → filter ticker. Keep ALL (active + expired + news). Sort chronologically.
2. Detect asset type (same logic as MODE 2).
IN PARALLEL:
IF IS_CRYPTO: get_crypto_prices(interval="day", limit=180), get_crypto_prices_intraday(interval="1h", limit=48),
get_crypto_snapshot, get_crypto_technical_indicators, get_crypto_metadata,
web_search("latest news {TICKER} crypto")
IF IS_STOCK: get_stock_prices(interval="day", 6 months), get_stock_prices_intraday(interval="1h", limit=48),
get_stock_performance, get_technical_indicators(limit=5), get_key_ratios,
get_news_feed(tickers=TICKER, days=30, limit=15), get_income_statements(quarterly, limit=4)
3. Timeline:
- List each alert by date, condition, trigger. Alert clusters within 1-2 days = "signal cluster".
- Overlay price at each alert date.
4. Pattern detection:
- Which conditions consistently precede price moves?
- Which alerts were "correct" vs "false signals"?
- Recurring sequences? Average lead time between alert and price move?
- Current alerts vs similar historical patterns: has this combination happened before? What followed?
5. Output:
### {TICKER} — Alert History
[Current state: price, RSI, MACD, SMA, 52w — 1 line]
### Alert Timeline
| Date | Condition | Trigger | Price | Outcome |
(✅ correct / ❌ false / ⏳ pending)
### Signal Clusters
[2-4 clusters. Each: dates, alerts involved, what happened next]
### Pattern Analysis
- Most reliable alert for {TICKER}: [type + hit rate] | Least reliable: [type]
- Typical cadence: [frequency, cyclical patterns] | Recurring sequence: [if found]
### Active Alerts — Historical Context
[For each active alert, find most similar historical instance and report outcome]
### Strategic Recommendations
[Modify thresholds? Which alert types work best? Historically critical levels?]
--- GENERAL RULES ---
- Always separate ACTIVE from EXPIRED alerts; news notifications get their own section.
- If get_user_notifications is empty or fails: state it and stop (do NOT invent notifications).
- News notifications come from the user's ★ favorites — mention that when relevant.
- Respond in user's language. Frame everything as "things to watch" not buy/sell recommendations.