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

# getDetailedPairStats

> Get windowed stats (volume, liquidity, OHLC, trades) for a single pair.

### Returns

<ResponseField name="getDetailedPairStats" type="DetailedPairStats!">
  Stats for the pair with optional time windows (e.g. 5m, 1h, 24h). See [DetailedPairStats](/api-reference/graphql/types/DetailedPairStats).
</ResponseField>

### Arguments

<ResponseField name="pairAddress" type="Address!" required>
  Pair contract address.
</ResponseField>

<ResponseField name="networkId" type="NetworkId!" required>
  Network ID (e.g. `1`, `42161`).
</ResponseField>

<ResponseField name="tokenOfInterest" type="TokenOfInterest">
  Which token to use for price (token0 or token1). See [TokenOfInterest](/api-reference/graphql/types/TokenOfInterest).
</ResponseField>

<ResponseField name="timestamp" type="Int">
  Optional timestamp for historical stats.
</ResponseField>

<ResponseField name="durations" type="[DetailedPairStatsDuration!]">
  Which time windows to return. See [DetailedPairStatsDuration](/api-reference/graphql/types/DetailedPairStatsDuration).
</ResponseField>

<ResponseField name="bucketCount" type="Int">
  Number of buckets per window.
</ResponseField>

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

### Example

```graphql theme={null}
{
  getDetailedPairStats(
    pairAddress: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"
    networkId: 1
    tokenOfInterest: token0
    durations: [hour1]
  ) {
    pairAddress
    networkId
    tokenOfInterest
    statsType
    lastTransaction
    pair {
      token0
      token1
      token0Data {
        address
        name
        symbol
      }
      token1Data {
        address
        name
        symbol
      }
    }
    stats_hour1 {
      statsUsd {
        volume {
          currentValue
          previousValue
          change
        }
        buyVolume {
          currentValue
          previousValue
          change
        }
        sellVolume {
          currentValue
          previousValue
          change
        }
      }
      statsNonCurrency {
        transactions {
          currentValue
          previousValue
          change
        }
        buyers {
          currentValue
          previousValue
          change
        }
        sellers {
          currentValue
          previousValue
          change
        }
      }
    }
  }
}
```

### Playground

<iframe src={`https://graphql.mobula.io/graphql?query=${encodeURIComponent('{ getDetailedPairStats(pairAddress: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640", networkId: 1, tokenOfInterest: token0, durations: [hour1]) { pairAddress networkId tokenOfInterest statsType lastTransaction pair { token0 token1 token0Data { address name symbol } token1Data { address name symbol } } stats_hour1 { statsUsd { volume { currentValue previousValue change } buyVolume { currentValue previousValue change } sellVolume { currentValue previousValue change } } statsNonCurrency { transactions { currentValue previousValue change } buyers { currentValue previousValue change } sellers { currentValue previousValue change } } } } }')}`} title="GraphQL Playground" style={{ width: '100%', minHeight: '600px', border: '1px solid var(--color-border)', borderRadius: '8px' }} />
