Expand description
HTX WebSocket API client implementation.
This module provides the WebSocketConnector and WebSocketConnection for interacting
with the HTX WebSocket API. It enables real-time streaming of market data, such as ticker
updates, and is used internally to implement the AssetInfoProvider trait for asset workers.
This module provides:
- Establishes WebSocket connections to HTX servers
- Subscribes and unsubscribes to ticker streams for specified symbols
- Processes incoming WebSocket messages, including gzip-compressed binary messages
- Transforms WebSocket messages into
AssetInfofor use in workers - Handles connection management, including ping/pong keep-alive and graceful closing
Structsยง
- WebSocket
Connection - Represents an active WebSocket connection to the HTX API.
- WebSocket
Connector - A connector for establishing WebSocket connections to the HTX WebSocket API.