Skip to main content
Subscriptions use wss://graphql.mobula.io/graphql with the graphql-transport-ws protocol. wss://graphql.mobula.io/graphql/subscriptions is also supported for backwards compatibility.

Returns

Price!
Price update payload (one push per matching swap). See Price.

Arguments

[OnPricesUpdatedInput!]!
required
List of tokens to subscribe to. See OnPricesUpdatedInput.
Boolean
When true, subscribe to liquidity-weighted token prices aggregated across all of the token’s pools instead of pair-derived prices. Not supported when any input item provides sourcePairAddress.

Behavior

  • One subscription, many tokens. Events from different tokens in the batch are interleaved.
  • Each matching swap produces one push (per token).
  • The useWeightedPrices flag applies uniformly to all tokens in the batch.

Example — batch of tokens, pair-derived

Example — batch with weighted prices

Example — mixed pair-pinned and default