Documentation Index
Fetch the complete documentation index at: https://docs.mobula.io/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint Details
- URL:
wss://api.mobula.io - Event Type:
funding
Subscription Format
Subscribe to funding rates for specific trading pairs:Parameters
symbol(required): Trading symbol (e.g.,"BTC","ETH").quote(optional): Quote asset (e.g.,"USDT","USD"). Defaults depend on exchange pairsexchange(optional): Comma-separated list of exchanges -binance,bybit,deribit,okx,hyperliquid,gate,lighterprotocol(optional): Hyperliquid only. One ofxyz,flx,vntl,hyna,km,cash. When set, used as symbol prefix (e.g.protocol: "cash"withsymbol: "HOOD"→cash:HOOD). Alternative to putting the prefix in the symbol (e.g.symbol: "cash:HOOD").interval(optional): Refresh interval in seconds for updatessubscriptionId(optional): Unique identifier for your WebSocket connection. Auto-generated if not providedsubscriptionTracking(optional, default:false): Include subscription details in response logs for debugging
Supported Exchanges: Binance, Bybit, Deribit, OKX, Hyperliquid, Gate.io, Lighter
Hyperliquid DEX (HIP3) Usage
Funding rates from Hyperliquid are available only for HIP3 perpetuals:- Symbol prefix: Use a colon in the symbol (e.g.,
"cash:HOOD","dex:BTC","xyz:XYZ100"), or protocolparameter: Setprotocolto one ofxyz,flx,vntl,hyna,km,cashwith the base symbol (e.g.symbol: "HOOD",protocol: "cash"→ same ascash:HOOD).- Include
exchange: "hyperliquid"in the payload.
Gate.io Note: Uses
usdt as the settle currency. Contracts are in format SYMBOL_USDT (e.g., BTC_USDT).Lighter Note: Funding rate sign convention - positive rate means longs pay shorts, negative rate means shorts pay longs. Epoch duration is 1 hour.
Response Format
Each funding rate update includes data from all requested exchanges:Implementation Example
Connection Keepalive (Ping/Pong)
To maintain active WebSocket connections and prevent timeouts, you can use the ping/pong mechanism: Send ping:Unsubscribing from the Stream
Unsubscribe from All Streams
To terminate all active subscriptions on the current WebSocket connection:Unsubscribe from Specific Subscription
To unsubscribe from a specific subscription using its ID:Unsubscribe from All Funding Streams
To unsubscribe from all funding streams while keeping other stream types active:If you didn’t provide a
subscriptionId when subscribing, one is auto-generated. To retrieve it, set "subscriptionTracking": true in the subscription payload.Support
Can’t find what you’re looking for? Reach out to us, response times < 1h.Support
Telegram
Support
Slack
Need help?
Email