Subscriptions use the WebSocket endpoint
wss://api.mobula.io/graphql/subscriptions with the graphql-transport-ws protocol.Returns
Arguments
Token contract address. Required unless
sourcePairAddress is provided.Network ID the token is deployed on (e.g.
1 for Ethereum, 1399811149 for Solana).Pair contract address from which to derive pricing. Defaults to the top pair for the token.
When
true, subscribe to liquidity-weighted token prices aggregated across all of the token’s pools instead of pair-derived prices. Not supported when sourcePairAddress is provided.Behavior
- Triggered by every swap on the token’s pools (or on the specified pair when
sourcePairAddressis set). - In pair-derived mode (default),
priceUsdreflects the swap’s pool ratio. Different pools of the same token can report slightly different prices. - In weighted mode,
priceUsdreflects the token-level liquidity-weighted aggregate across all of the token’s pools — smoother, less sensitive to single-pool noise.