Alerts
Alerts in FORJ have two parts that work together:
- Alert Definitions (configured by a strategy author in SMITH)
- Alert Subscriptions (configured by users who want to receive those alerts)
This split is important: a strategy can define rich alert logic, but no one is notified until there is at least one matching subscription.
How Alerts Work
- A strategy author creates Alert Definitions on a strategy (for example: "fire an alert when action X executes" or "when state changes from A to B")
- During strategy runtime, when a definition matches, FORJ emits an alert event and creates an AlertTrigger record
- FORJ evaluates Alert Subscriptions (scope, kind, severity, and channel rules)
- For each matching subscriber × channel, FORJ creates and processes an AlertDelivery record
Alert Definitions vs Subscriptions
| Concept | Who configures it | Purpose |
|---|---|---|
| Alert Definition | Strategy author (in SMITH) | Defines what strategy behavior should emit alerts |
| Alert Subscription | Any authorized user | Defines who gets alerted and how (in-app, email, SMS, webhook) |
Alert Trigger Types
Alert Definitions can emit alerts for different runtime behaviors:
| Type | Fires When |
|---|---|
| Event | A specific market event arrives (e.g., a new candle on a particular stream) |
| Condition | A specific condition evaluates to true or false |
| Action | A specific action executes (e.g., "Execute Trade" fires) |
| Transition | The strategy changes from one state to another |
Severity Levels
Each Alert Definition includes severity. Subscriptions can then filter by severity (for example: high-only to SMS, everything to in-app).
Delivery Channels
Subscriptions can route matching alerts through multiple channels:
| Channel | Description |
|---|---|
| In-app | Real-time push notification within FORJ |
| Sent to your registered email address | |
| Webhook | HTTP POST to an external URL (for integration with copy traders, Slack, Discord, etc.) |
| SMS | Text message notification |
See Configuring Alert Definitions to define what emits alerts, then Subscriptions to choose who receives them.