Skip to main content
This endpoint is only available to Growth and Enterprise plans.

Endpoint Details

  • URL: wss://api.mobula.io
  • Event Type: quoting
The quoting stream continuously emits swap quotes for a fixed tokenIn -> tokenOut request. It sends:
  • a quote immediately after subscription,
  • a periodic quote every intervalMs milliseconds,
  • an extra quote whenever a trade touches either tokenIn or tokenOut,
  • never more frequently than minIntervalMs.
By default, intervalMs is 1000 and minIntervalMs is 300. The minimum accepted minIntervalMs is 100.

Subscription Format

Parameters

  • chainId or blockchain (required): Blockchain identifier, for example solana:solana, solana, evm:1, or ethereum.
  • tokenIn (required): Address of the token to swap from.
  • tokenOut (required): Address of the token to swap to.
  • amount, amountRaw, or amountUSD (required): Exactly one amount selector. amountRaw is recommended for execution-grade precision.
  • walletAddress (required): Wallet used to build executable quote calldata.
  • slippage (optional): Slippage tolerance in percent. Default: 1.
  • intervalMs (optional): Periodic refresh interval in milliseconds. Default: 1000, minimum: 100.
  • minIntervalMs (optional): Minimum delay between two emitted quotes. Default: 300, minimum: 100.
  • poolAddress (optional): Restrict the route to a specific pool.
  • onlyRouters (optional): Router allow-list, for example ["jupiter"] or "jupiter,naos".
  • onlyProtocols / excludedProtocols (optional): Protocol filters, same semantics as the REST swap quoting endpoint.
  • prioritizationFeeLamports, dynamicComputeUnitLimit, jitoTipLamports, payerAddress (optional): Solana execution options.
  • feePercentage, feeWallet, minFeesNative (optional): Fee options.
  • onlyVerifiedTokens (optional): Reject unverified launchpad tokens when true.
  • directRoutes (optional): Force direct routes only.
  • subscriptionId (optional): Custom subscription id.
  • subscriptionTracking (optional): Sends a subscribed acknowledgement when true.

Trade Triggering

Trade-triggered quotes are keyed on both sides of the quote. If you subscribe to tokenIn = SOL and tokenOut = TOKEN, a trade on either SOL or TOKEN can trigger a new quote, even when the trade is not directly in the requested buy direction. During heavy trade bursts, the stream coalesces updates using minIntervalMs. For example, with intervalMs = 500 and minIntervalMs = 100, the stream sends at least the periodic quotes and can react to trades, but it will not emit more than one quote per 100ms for that subscription.

Response Format

quoteTrigger is one of:
  • initial: first quote after subscription
  • interval: periodic refresh
  • swap: trade-triggered refresh
If quote generation fails, the frame keeps the same envelope and includes error.

Unsubscribe