Product demo
Endpoint Details
- URL:
wss://production-api.mobula.io - Event Type:
ohlcv
Pool Mode Subscription
Subscribe to OHLCV data for a specific pool:Asset Mode Subscription
Subscribe to OHLCV data for a specific token:Parameters
address(conditional): Pool address for pool mode - required if not usingassetasset(conditional): Token address for asset mode - required if not usingaddresschainId(required): Blockchain identifier - See supported chainsperiod(required): Candlestick timeframe -1s,1min,5min,15min,1h,4h,1d,1w,1MsubscriptionId(optional): Unique identifier for your WebSocket connection. Auto-generated if not providedsubscriptionTracking(optional, default:false): Include subscription details in response logs for debugging
You can use either pool mode (with
address) or asset mode (with asset), but not both simultaneously.Implementation Example
Pool Mode Example: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 OHLCV Streams
To unsubscribe from all OHLCV 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.