Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.alterscope.org/llms.txt

Use this file to discover all available pages before exploring further.

wss://{host}/v2/ws/risk-events upgrades to a WebSocket and streams risk events that match a per-connection filter. Filters are query-string only and are locked at connect time — to change them, disconnect and reconnect. Tier-gated: requires Pro or higher. Free-tier keys receive 403 on the upgrade.

Filter dimensions

Same shape as the REST /v2/risk-events/feed endpoint:
FieldDescription
typesComma-separated event types (e.g. depeg,liquidation).
severityMinimum severity (info, warn, critical).
subject_idRestrict to a specific subject (token, vault, address).
chainChain identifier (ethereum, stellar, …).
protocolProtocol slug (aave-v3, blend, morpho-blue, …).

Try it

Message envelope

Each message is a JSON object with a top-level event payload and a meta object. When meta._agentic is present the playground highlights its keys.
{
  "event": {
    "id": "evt_01J...",
    "type": "depeg",
    "severity": "critical",
    "subject_id": "USDC",
    "chain": "ethereum",
    "protocol": "aave-v3",
    "occurred_at": "2026-04-28T12:00:00Z"
  },
  "meta": {
    "_agentic": {
      "schema_version": "1.0.0",
      "freshness": { "computed_at": "...", "age_seconds": 2, "status": "fresh" },
      "confidence": 0.97,
      "sources": ["risk-engine", "oracle-service"]
    }
  }
}

Close codes

CodeMeaning
1000Normal closure (client clicked Disconnect, navigated away, etc.).
4401Auth failed (missing or revoked key).
4403Tier insufficient.
4429Per-tier connection limit reached. Retry with backoff.