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

# onDetailedStatsUpdated

> Live-streamed bucketed stats for a pair across 8 windows (min5, min15, hour1, hour4, hour12, day1, week1, day30).

### Returns

<ResponseField name="onDetailedStatsUpdated" type="DetailedPairStats!">
  Detailed pair-level windowed stats pushed on every swap on the pair. See [DetailedPairStats](/api-reference/graphql/types/DetailedPairStats).
</ResponseField>

### Arguments

<ResponseField name="pairId" type="String!" required>
  Pair identifier in `<pairAddress>:<networkId>` form. Invalid inputs return `BAD_USER_INPUT`.
</ResponseField>

<ResponseField name="tokenOfInterest" type="TokenOfInterest">
  Which side of the pair stats are computed against (`token0` or `token1`). See [TokenOfInterest](/api-reference/graphql/types/TokenOfInterest).
</ResponseField>

<ResponseField name="statsType" type="TokenPairStatisticsType">
  `FILTERED` or `UNFILTERED`. Defaults to `UNFILTERED`. See [TokenPairStatisticsType](/api-reference/graphql/types/TokenPairStatisticsType).
</ResponseField>

<ResponseField name="bucketCount" type="Int">
  Number of buckets per window. Server may clamp to a reasonable maximum.
</ResponseField>

### Example

```graphql theme={null}
subscription OnDetailedStatsUpdated {
  onDetailedStatsUpdated(
    pairId: "BGm1tav58oGcsQJehL9WXBFXF7D27vZsKefj4xJKD5Y:1399811149"
    tokenOfInterest: token0
    statsType: UNFILTERED
    bucketCount: 12
  ) {
    pairAddress
    tokenOfInterest
    statsType
    stats_hour1 {
      duration
      start
      end
      statsUsd { volume { change currentValue previousValue } }
      statsNonCurrency { transactions { currentValue } buys { currentValue } sells { currentValue } }
    }
  }
}
```
