Endpoint Details
- URL:
wss://api.mobula.io - Event Type:
fast-trade
Subscription Formats
Thefast-trade endpoint supports subscribing to trades for multiple pools and tokens with real-time updates.
Multiple Items Subscription (Recommended)
Subscribe to multiple pools and tokens using theitems array format with assetMode:
Token Mode Subscription
For token-specific trades (whenassetMode is true):
Parameters
assetMode(required): Boolean indicating subscription modefalse: Subscribe to pools (default)true: Subscribe to tokens
items(required): Array of subscription items, each containing:blockchain(required): Blockchain identifier (e.g.,"evm:1","solana")address(required): Pool or token address
subscriptionId(optional): Unique identifier for your WebSocket connection. Auto-generated if not providedsubscriptionTracking(optional, default:false): Include subscription details in response logs for debuggingmaxUpdatesPerMinute(optional): Limit how often the server sends updates for each pool/token. See Update Rate Throttling belowfilterOutliers(optional, default:false): Whentrue, filters out dust trades and price outliers. See Outlier Filtering below
Trade Data Only: This endpoint provides trade events without enriched market data. For complete market statistics with each trade, use
market-details or token-details streams instead.Asset Mode: The assetMode parameter determines address interpretation:false(default): Addresses are pool addressestrue: Addresses are token addresses
Real-Time Updates
After subscribing, you’ll receive real-time updates whenever new trades occur involving the subscribed pools/tokens.Real-Time Trade Updates
When trades happen involving subscribed items, you’ll receive updates with trade information. The response format depends on theassetMode used in your subscription:
Pool Mode Response (assetMode: false)
Token Mode Response (assetMode: true)
Response Fields
pair: Pool address where the trade occurred (present in pool mode and token mode)token: Base token address involved in the trade (only in token mode:assetMode = true)date: Timestamp of the trade (Unix milliseconds)tokenPrice: Price of the traded token in USDtokenPriceVs: Price of the quote token in USDtokenAmount: Amount of tokens traded (base token)tokenAmountVs: Amount of quote tokens tradedtokenAmountUsd: USD value of the tradetokenNativePrice: Price of the traded token in the blockchain’s native currency (e.g., ETH for Ethereum, SOL for Solana)tokenMarketCapUSD: Market capitalization of the traded token in USD (based on circulating supply)type: Trade type (“buy” or “sell”)operation: Operation type (“regular”, “arbitrage”, etc.)blockchain: Blockchain namehash: Transaction hashsender: Transaction sender addresstokenAmountRaw: Raw token amount (base token)tokenAmountRawVs: Raw token amount (quote token)preBalanceBaseToken: Sender’s balance of the base token before the swap (bigint or null)preBalanceQuoteToken: Sender’s balance of the quote token before the swap (bigint or null)postBalanceBaseToken: Sender’s balance of the base token after the swap (bigint or null)postBalanceQuoteToken: Sender’s balance of the quote token after the swap (bigint or null)labels: Array of labels associated with the sender wallet for the base token/pool (see Label Values below)walletMetadata: Entity metadata for the sender wallet (see Wallet Metadata below), ornullif not availableplatform: Trading platform/aggregator identifier (e.g., “axiom”, “gmgn”, “padre”, “trojan”, “universalX”) or null if not availableplatformMetadata: Object withid,name, andlogofor the trading platform, ornullif not availablesubscriptionId: Your subscription identifiertimestamp: Server timestamp when the update was sent
Fee Breakdown
Complete fee transparency: Unlike other platforms that only show gas + total, Mobula provides the full breakdown in real-time.
totalFeesUSD: Total fees in USD (gas + platform + MEV combined)gasFeesUSD: Network gas fees in USDplatformFeesUSD: Platform/aggregator fees in USD (Axiom, GMGN, Trojan, etc.)mevFeesUSD: MEV-related fees in USD (priority fees, Jito bundles, etc.)
Label Values
Thelabels array can contain any combination of the following values, providing insight into the trader’s behavior and classification:
Label Context: Labels are scoped to the specific token being traded. For example, a wallet may be labeled as
sniper for Token A but not for Token B.Example with Labels
- Sniped the token early (
sniper) - Uses a professional trading platform (
proTrader) - Has been identified as a smart/profitable trader (
smartTrader)
Wallet Metadata
When the sender wallet is a known entity (e.g., Wintermute, Binance, Jump Trading), thewalletMetadata field provides additional context:
Optional Fields Behavior
Unsubscribing from the Stream
Unsubscribe from All Trade Streams
Unsubscribe from Specific Subscription
Unsubscribe from Specific Subscription with Type
Unsubscribe from Specific Items (Partial Unsubscription)
You can unsubscribe from specific pools/tokens while keeping others active in the same subscription:Unsubscribe from Multiple Specific Items
Unsubscribe from Specific Items in a Specific Subscription
If you didn’t provide a
subscriptionId when subscribing, one is auto-generated. To retrieve it, set "subscriptionTracking": true in the subscription payload.For partial unsubscriptions without subscriptionId, the system will automatically find and modify subscriptions that contain the specified items, leaving other items in those subscriptions active.Update Rate Throttling
You can control how frequently the server sends update messages per pool/token using themaxUpdatesPerMinute field. This is useful for reducing bandwidth when you don’t need every single trade update.
How It Works
Despite the name,maxUpdatesPerMinute does not set a budget that gets consumed over a minute. Instead, it sets a minimum interval between delivered updates per pool/token:
maxUpdatesPerMinute: 100 → minimum interval of 600ms between two delivered updates for the same pool/token.
- Interval-based, not budget-based: The server enforces a cooldown between updates. Once an update is delivered, all subsequent updates for that pool/token are dropped until the interval elapses. There is no counter that depletes — after each delivered update, the cooldown simply restarts.
- Per-pool/per-token throttle: Each subscribed item is throttled independently. Subscribing to 5 items with
maxUpdatesPerMinute: 60means each item sends at most 1 update/second. - Dropped, not buffered: When an update arrives during the cooldown, it is silently dropped — not queued or aggregated. The next update arriving after the interval has elapsed will be delivered normally.
Burst Behavior Example
WithmaxUpdatesPerMinute: 100 (interval = 600ms), if a pool receives a burst of 50 updates in 1 second:
You receive ~2 updates from the burst, and updates resume normally afterwards. There is no debt or penalty — the throttle does not “remember” dropped updates or block future delivery.
Reference Values
When
maxUpdatesPerMinute is not provided, no throttle is applied and updates are delivered as fast as they arrive.Outlier Filtering
WhenfilterOutliers is set to true, the server applies the same outlier detection used by the OHLCV WebSocket stream. This prevents dust trades and price manipulation from polluting your data.
What Gets Filtered
When
filterOutliers is false (default), all trades are delivered without any filtering — the same behavior as before this feature was introduced.Implementation Example
Connection Keepalive (Ping/Pong)
To maintain active WebSocket connections and prevent timeouts, you can use the ping/pong mechanism: Send ping:Support
Can’t find what you’re looking for? Reach out to us, response times < 1h.Support
Telegram
Support
Slack
Need help?
Email