> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobula.io/llms.txt
> Use this file to discover all available pages before exploring further.

# onPairMetadataUpdated

> Live-streamed metadata updates for a single pair (price, liquidity, volume, windowed stats).

<Note>
  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.
</Note>

### Returns

<ResponseField name="onPairMetadataUpdated" type="PairMetadata!">
  Pair metadata payload pushed on every relevant swap. See [PairMetadata](/api-reference/graphql/types/PairMetadata).
</ResponseField>

### Arguments

<ResponseField name="id" type="String!" required>
  Pair ID in the form `pairAddress:networkId` (e.g. `0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640:1`).
</ResponseField>

<ResponseField name="quoteToken" type="QuoteToken">
  Force the quote-token side (`token0` or `token1`). When omitted, the server picks a default. See [QuoteToken](/api-reference/graphql/types/QuoteToken).
</ResponseField>

<ResponseField name="statsType" type="TokenPairStatisticsType">
  Whether windowed stats should be `FILTERED` or `UNFILTERED`. See [TokenPairStatisticsType](/api-reference/graphql/types/TokenPairStatisticsType).
</ResponseField>

<ResponseField name="useNonLiquidityTokenAsQuoteToken" type="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.
</ResponseField>

### 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

```graphql theme={null}
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

```graphql theme={null}
subscription {
  onPairMetadataUpdated(
    id: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640:1"
    useNonLiquidityTokenAsQuoteToken: true
  ) {
    quoteToken
    nonLiquidityToken
    price
    priceNonQuoteToken
  }
}
```
