GEX
Public feedInitializing terminal
Real-time alert stream
Real-time alert stream over WebSocket. Pushes alert objects when significant thresholds are crossed: DSI extreme readings, regime flips, GAF instability spikes, VPIN surges, and hedging band activations. Only fires when material threshold events occur, so traffic is sparse but focused on research-relevant state changes.
| Name | Type | Required | Description |
|---|---|---|---|
| api_key | string | Required | Your API key. Passed as a query parameter. |
Each alert object includes a type field indicating the alert category:
import asyncio
import websockets
import json
async def listen_alerts():
uri = "wss://api.gexengine.com/ws/v1/alerts?api_key=YOUR_API_KEY"
async with websockets.connect(uri) as ws:
async for message in ws:
alert = json.loads(message)
print(f"[{alert['severity']}] {alert['symbol']}: {alert['message']}")
asyncio.run(listen_alerts())