Service for streaming trades, L2 order book snapshots, and candles from Hyperliquid DEX via WebSocket and publishing them to Kafka.
- Real-time WebSocket connection to Hyperliquid.
- Supports multiple coins and subscription types.
- Automatic mapping to Protocol Buffer formats.
- Configurable via
config.jsonor environment variables.
The service uses a config.json file for configuration. See config.json.example for a template.
| Setting | Description | Default |
|---|---|---|
HYPERLIQUID_WS_URL |
Hyperliquid WebSocket API URL | wss://api.hyperliquid.xyz/ws |
KAFKA_BROKERS |
Comma-separated list of Kafka brokers | localhost:9092 |
SUBSCRIPTION_TYPES |
Data types to subscribe to (trades, l2Book, candle) |
["trades", "l2Book", "candle"] |
COINS |
List of coin symbols and specific candle intervals | BTC, ETH, etc. |
LOG_LEVEL |
Logging level | info |
npm run devnpm run build
npm start- Connector: Manages WebSocket lifecycle and subscriptions to Hyperliquid.
- Mappers: Transforms raw Hyperliquid JSON messages into shared Protobuf structures.
- Producer: Publishes messages to coin-specific Kafka topics.