Endpoint Details
- URL:
wss://production-feed.mobula.io - Event Type:
feed
Subscription Formats
The Price Feed Stream supports two versions with different subscription methods.V2 Subscription (Recommended)
Version 2 provides more flexibility with two subscription modes:Subscribe by Asset IDs
Subscribe by Token Addresses
V1 Subscription (Legacy)
Subscribe to all assets in the database:Parameters
V2 Parameters
kind(required for V2): Subscription mode -asset_idsoraddressasset_ids(optional): Array of asset IDs to subscribe to. Omit for all assetstokens(optional): Array of token objects withblockchainandaddress. Omit for all tokensquote_id(optional): Quote asset ID for pricing. Defaults to USDquote(optional): Quote token object withblockchainandaddress. Defaults to USD
You can find asset IDs using the
/all endpoint. If asset_ids or tokens are omitted, you’ll receive updates for all registered assets.Data Model
Each price update includes the following fields:Example Response
Pricing Methodology
Our pricing methodology uses a weighted average based on market depth and volume for each contract, then re-weights based on contract volume to calculate the final multichain price. For more details, see our pricing methodology article.Adding Assets to Feed (V1)
For V1 subscriptions, you can dynamically add assets to your feed:quoteId empty to use USD as the default quote currency.
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 by Asset IDs
Unsubscribe by Token Addresses
Support
Can’t find what you’re looking for? Reach out to us, response times < 1h.Support
Telegram
Support
Slack
Need help?
Email