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

# getDetailedStats

> Returns bucketed stats for a given token within a pair. Reference for the getDetailedStats query in the Codex API: arguments, response fields, and usage.

## GraphQL

```
type Query {
  getDetailedStats(
    pairId: String!
    tokenOfInterest: TokenOfInterest
    timestamp: Int
    windowSizes: [DetailedStatsWindowSize]
    bucketCount: Int
    statsType: TokenPairStatisticsType
  ): DetailedStats
}

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
}

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


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