AGG is currently in alpha. APIs, components, and docs may change.
{
"type": "connected",
"appId": "app_demo123",
"userId": "usr_xyz789"
}{
"type": "authenticated",
"userId": "usr_xyz789"
}{
"type": "heartbeat",
"ts": 0
}{
"action": "authenticate",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}Authenticate mid-session to receive user-specific events. Send your JWT token (same as REST API) to upgrade from app-level to user-level auth. Supports re-authentication for token refresh or user switch.
Connect-time auth: Pass ?token=eyJ... as a query param alongside appId.
Documentation Index
Fetch the complete documentation index at: https://docs.agg.market/llms.txt
Use this file to discover all available pages before exploring further.
{
"type": "connected",
"appId": "app_demo123",
"userId": "usr_xyz789"
}{
"type": "authenticated",
"userId": "usr_xyz789"
}{
"type": "heartbeat",
"ts": 0
}{
"action": "authenticate",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}App-level auth: pass appId as a query parameter on connect. Required for all connections. The appId must belong to an active app with matching allowed origins.
User-level auth: pass JWT as token query param on connect, or send { action: 'authenticate', token } mid-session. Required for user-specific events (orders, balances). Same JWT as the REST API.
Sent immediately after successful connection. Includes userId if JWT was provided on connect.
Confirms successful mid-session authentication
Application-level heartbeat event for connection liveness
Upgrade connection to user-level auth. Uses the same JWT as the REST API. Supports re-authentication for token refresh or user switch.