Skip to main content
The SDK supports WebSocket connections for streaming live data. Unlike REST operations that go through the LI.FI Perps API, WebSocket connections are made directly to the provider for lowest latency. The SDK discovers the WebSocket URL from the GET /getProviders response and handles connection management, reconnection, and data normalization automatically. All incoming data is normalized to the same types used by REST responses (OrderbookResponse, Order, Position, etc.), so your application logic works identically whether the data came from a REST call or a WebSocket event. See SDK / Streaming for usage details and available channels.