This endpoint is only available to Growth and Enterprise plans.
Endpoint Details
- URL:
wss://api.mobula.io - Message: JSON string
Subscription Tracking
You can optionally track your WebSocket subscription using the following fields:- subscriptionId (optional): A unique ID for your WebSocket connection. If not provided, it is automatically generated by the server.
- subscriptionTracking (optional, default: false): Set this to true to include the subscriptionId and additional connection details in the response logs. Helpful for debugging and managing multiple active streams.
Payload Parameters
| Parameter | Required | Description |
|---|---|---|
symbol | Yes | Trading symbol (e.g., "BTC"). |
quote | No | Quote asset (e.g., "USDT"). If omitted, defaults depend on exchange pairs. |
exchange | No | Optional CeFi exchanges, comma-separated (binance,bybit,deribit,okx,hyperliquid) |
interval | No | Refresh interval in seconds for updates. |
subscriptionId | No | Custom ID to manage/unsubscribe this feed without affecting others. |
subscriptionTracking | No | Free-form tag for debugging, analytics, or client-side tracking. |
Supported exchanges:
binance, bybit, deribit, okx, hyperliquid.Hyperliquid (DEX - HIP3) Usage:
Funding rates from Hyperliquid are available only for HIP3 perpetuals.
To access them:Example Payload:
- Prefix the symbol with
dex:→ e.g.,"symbol": "dex:BTC"or"symbol": "dex:XYZ100"- Include
exchange: "hyperliquid"in the payload
Response Example
Unsubscribing from the stream
You can unsubscribe from the stream by sending an unsubscribe message:- Unsubscribe from all active streams: Send an empty payload as shown above. This will terminate all active subscriptions associated with the current WebSocket connection.
- Unsubscribe from a specific subscriptionId: Include the relevant subscriptionId in the payload:
If you did not provide a subscriptionId when subscribing, one is generated automatically. To retrieve it, set “subscriptionTracking”: “true” in the subscription payload. Otherwise, it will not be returned in the response.
- Unsubscribe from a specific stream type: To unsubscribe all streams of a given type (e.g., all “pair”, “market”, “funding” streams):