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

# DetailedStats

> Detailed stats for a token within a pair. Reference for the DetailedStats type in the Codex API: every field, its type, and the operations that return it.

## GraphQL

```
type DetailedStats {
  pairId: String!
  tokenOfInterest: TokenOfInterest!
  statsType: TokenPairStatisticsType!
  stats_min5: WindowedDetailedStats
  stats_hour1: WindowedDetailedStats
  stats_hour4: WindowedDetailedStats
  stats_hour12: WindowedDetailedStats
  stats_day1: WindowedDetailedStats
}

enum TokenOfInterest {
  token0
  token1
}

enum TokenPairStatisticsType {
  FILTERED
  UNFILTERED
}

enum DetailedStatsWindowSize {
  day1
  hour12
  hour4
  hour1
  min5
}

type DetailedStatsBucketTimestamp {
  start: Int!
  end: Int!
}

type DetailedStatsNumberMetrics {
  change: Float!
  currentValue: Int!
  previousValue: Int!
  buckets: [Int]!
}

type DetailedStatsStringMetrics {
  change: Float!
  currentValue: String!
  previousValue: String!
  buckets: [String]!
}

type WindowedDetailedStats {
  windowSize: DetailedStatsWindowSize!
  timestamp: Int!
  endTimestamp: Int!
  buckets: [DetailedStatsBucketTimestamp]!
  transactions: DetailedStatsNumberMetrics!
  volume: DetailedStatsStringMetrics!
  buys: DetailedStatsNumberMetrics!
  sells: DetailedStatsNumberMetrics!
  buyers: DetailedStatsNumberMetrics!
  sellers: DetailedStatsNumberMetrics!
  traders: DetailedStatsNumberMetrics
  buyVolume: DetailedStatsStringMetrics
  sellVolume: DetailedStatsStringMetrics
}
```

### Used By

**Returned by**

* [getDetailedStats](https://docs.codex.io/api-reference/queries/getdetailedstats.md) *(deprecated)*: Returns bucketed stats for a given token within a pair.
* [onDetailedStatsUpdated](https://docs.codex.io/api-reference/subscriptions/ondetailedstatsupdated.md): Live-streamed bucketed stats for a given token within a pair.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.