Skip to main content
Subscriptions use the WebSocket endpoint wss://api.mobula.io/graphql/subscriptions with the graphql-transport-ws protocol.

Returns

onPairMetadataUpdated
PairMetadata!
Pair metadata payload pushed on every relevant swap. See PairMetadata.

Arguments

id
String!
required
Pair ID in the form pairAddress:networkId (e.g. 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640:1).
quoteToken
QuoteToken
Force the quote-token side (token0 or token1). When omitted, the server picks a default. See QuoteToken.
statsType
TokenPairStatisticsType
Whether windowed stats should be FILTERED or UNFILTERED. See TokenPairStatisticsType.
useNonLiquidityTokenAsQuoteToken
Boolean
When true and quoteToken is not explicitly provided, the quote side defaults to the non-liquidity (asset) token of the pair instead of the deeper-liquidity side.

Behavior

  • Fires once per swap on the pair (filtered to swaps with amountUSD > 0.1).
  • The payload includes price, liquidity, windowed price-change / volume / high / low stats, and optional enhanced token data, wallet activity, and top-10 holder concentration — selection-aware (only fields requested are computed).
  • Multiple subscribers on the same pair sharing the same quoteToken / statsType / useNonLiquidityTokenAsQuoteToken triple share a single fetch per swap.

Example

subscription {
  onPairMetadataUpdated(
    id: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640:1"
    statsType: FILTERED
  ) {
    id
    pairAddress
    networkId
    price
    priceNonQuoteToken
    quoteToken
    liquidityToken
    nonLiquidityToken
    liquidity
    volume24
    priceChange24
    walletActivity {
      sniperCount
      bundlerCount
      insiderCount
    }
  }
}

Example — non-liquidity side as quote

subscription {
  onPairMetadataUpdated(
    id: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640:1"
    useNonLiquidityTokenAsQuoteToken: true
  ) {
    quoteToken
    nonLiquidityToken
    price
    priceNonQuoteToken
  }
}