Skip to main content

Private Channels

Private channels stream account-specific events. They require an authenticated WebSocket handshake using a wallet signature, delegated credential, or institutional key.

Channels

ChannelPurpose
ordersOrder acknowledgements, amendments, cancels, terminal states
fillsExecution events with fee and liquidity role
balancesCollateral changes, holds, releases, settlement adjustments
positionsPosition changes, realized and unrealized PnL updates
riskMargin, liquidation, and account health updates
withdrawalsWithdrawal request, checkpoint, proof, and execution status

Authenticated handshake

Private connections start with an authentication control message:

{
"op": "authenticate",
"account": "0x1234...",
"credentialType": "delegated_session",
"timestamp": 1730000000000,
"signature": "0x..."
}

The server responds with:

{
"op": "authenticated",
"account": "0x1234...",
"sessionId": "sess_..."
}

Sequence scope

Private streams are sequenced by account. Clients should persist the last processed account sequence and use it during reconnect to avoid double-processing fills or terminal order states.

Security notes

  • Keep delegated credentials scoped and time-limited.
  • Separate read-only stream credentials from trading credentials where possible.
  • Treat private stream disconnects as operational alerts for unattended trading.