Hydromancer WebSockets provide high-performance, real-time data streaming for decentralized exchanges and DeFi protocols. By integrating Hydromancer through Uniblock, you can access low-latency market data and transaction events via a unified interface.Documentation Index
Fetch the complete documentation index at: https://docs.uniblock.dev/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
To connect to Hydromancer WebSockets through Uniblock, use the following base URL:Authentication
Uniblock supports two ways to authenticate your Hydromancer WebSocket connection and validation requests:- URL query parameter: Append
apiKey=YOUR_API_KEYto the connection string. - Header: Include
x-api-key: YOUR_API_KEYin your request headers.
Parameters
| Parameter | Required | Description |
|---|---|---|
chainId | Yes | The blockchain network ID. Currently, only mainnet is supported. |
apiKey / x-api-key | Yes | Your unique Uniblock API key. |
Validate connection
Before integrating, use the validation endpoint to verify your credentials. You can pass the API key in the URL or the header.Option 1: Header authentication
Header authentication is recommended to avoid exposing your API key in URLs.
Option 2: URL authentication
Supported networks
| Name | chainId | Status |
|---|---|---|
| Ethereum Mainnet | mainnet | Supported |
| Testnets | testnet | Coming Soon |
Features and subscriptions
Hydromancer supports provider-specific subscription messages after connection. Once connected, you can send subscription messages as defined in the Hydromancer protocol documentation.Common channels
- L2 Book: Real-time order book snapshots and updates.
- Trades: Individual trade executions across supported DEXs.
- Mids: Real-time mid-price updates.
Best practices
- Security: Use the
x-api-keyheader where possible to avoid exposing your key in server logs or browser history. - Keep-alive: Implement a heartbeat with ping/pong every 30 to 60 seconds to prevent connection timeouts.
- Reconnection: Use an exponential backoff strategy for reconnections to handle network instability.