Market Data (WebSocket)
Risk Metrics
Risk Metrics WebSocket subscription and response reference.
WSS
Connect to
Initial Response: Latest cached risk metrics (if available)
Updates: Event-driven (only when asset risk changes)
Risk Metrics Fields:
wss://mainnet-ws1.bulk.trade, then send the subscription below. All channels share the same socket; the page name is not a separate endpoint path. The playground sends read-only subscription messages.
Subscribe to the complete risk-surface set for a symbol, including the live
regime, maximum-leverage curve, per-regime maintenance-margin grids, and asset
correlations.
Buy/sell point fields (each cell in the grid):
Surface indexing: Select the desired
surfaces[] regime, find the
notional and leverage brackets, then use
buy[notional_idx][leverage_idx] or
sell[notional_idx][leverage_idx]. Interpolate between surrounding grid
points if needed.