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.
{
  "type": "funding",
  "authorization": "YOUR-API-KEY",
  "payload": {
    "symbol": "BTC",
    "quote": "USDT",
    "interval": 10,
    "subscriptionId": "funding-feed-1",
    "subscriptionTracking": "true"
  }
}

Payload Parameters

ParameterRequiredDescription
symbolYesTrading symbol (e.g., "BTC").
quoteNoQuote asset (e.g., "USDT"). If omitted, defaults depend on exchange pairs.
exchangeNoOptional CeFi exchanges, comma-separated (binance,bybit,deribit,okx,hyperliquid)
intervalNoRefresh interval in seconds for updates.
subscriptionIdNoCustom ID to manage/unsubscribe this feed without affecting others.
subscriptionTrackingNoFree-form tag for debugging, analytics, or client-side tracking.
Supported exchanges: binance, bybit, deribit, okx, hyperliquid.

Response Example

{
    "queryDetails": {
        "base": "BTC",
        "quote": "USDT"
    },
    "subscriptionId": "funding-feed-1",
    "timestamp": 1756194263149,
    "sequence": 1,
    "binanceFundingRate": {
        "symbol": "BTCUSDT",
        "fundingTime": 1756166400000,
        "fundingRate": 0.00004522,
        "marketPrice": "110064.58160507",
        "epochDurationMs": 28800000,
        "fundingRateCap": 0.3,
        "fundingRateFloor": -0.3
    },
    "bybitFundingRate": {
        "symbol": "BTCUSDT",
        "fundingTime": 1756166400000,
        "fundingRate": 0.0001,
        "epochDurationMs": 28800000
    },
    "hyperliquidFundingRate": {
        "symbol": "BTC",
        "fundingTime": 1756188000000,
        "fundingRate": 0.0000125,
        "marketPrice": 110301,
        "epochDurationMs": 3600000
    },
    "okxFundingRate": {
        "symbol": "BTC-USDT-SWAP",
        "fundingTime": 1756195200000,
        "fundingRate": 0.0001,
        "epochDurationMs": 28800000
    }
}

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.

{
  "type": "unsubscribe", 
  "authorization": "API-KEY",
  "payload": {},
};
 
  • Unsubscribe from a specific subscriptionId: Include the relevant subscriptionId in the payload:

{
  "type": "unsubscribe",
  "authorization": "API-KEY",
  "payload": {
	"subscriptionId": "your-subscription-id"
  }
};
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):
{
  "type": "unsubscribe",
  "authorization": "API-KEY",
  "payload": {
    "type": "funding"
  }
}
Can’t find what you’re looking for? Reach out to us, response times < 1h.