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. See Price.

Arguments

String
Token contract address. Required unless sourcePairAddress is provided.
Int
Network ID the token is deployed on (e.g. 1 for Ethereum, 1399811149 for Solana). Required at runtime when address is used — pair the two.
String
Pair contract address from which to derive pricing. Defaults to the top pair for the token.
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 sourcePairAddress is provided.

Behavior

  • Triggered by every swap on the token’s pools (or on the specified pair when sourcePairAddress is set).
  • In pair-derived mode (default), priceUsd reflects the swap’s pool ratio. Different pools of the same token can report slightly different prices.
  • In weighted mode, priceUsd reflects the token-level liquidity-weighted aggregate across all of the token’s pools — smoother, less sensitive to single-pool noise.

Example — pair-derived (default)

Example — weighted

Example — pinned to a specific pair