Skip to main content

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.

Returns

DetailedPairStats
[DetailedPairStats]
See DetailedPairStats

Arguments

input
[GetDetailedPairsStatsInput!]!
required
See GetDetailedPairsStatsInput

Example

Test this query in the Explorer →
{
  getDetailedPairsStats(
    input: [
      {
        pairAddress: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"
        networkId: 1
        tokenOfInterest: token0
        durations: [hour1, day1]
      }
      {
        pairAddress: "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc"
        networkId: 1
        tokenOfInterest: token0
        durations: [hour1, day1]
      }
    ]
  ) {
    pairAddress
    networkId
    tokenOfInterest
    stats_hour1 {
      statsUsd {
        volume {
          currentValue
          change
        }
      }
      statsNonCurrency {
        transactions {
          currentValue
          change
        }
      }
    }
  }
}

Usage Guidelines

  • Query multiple pairs in a single request by passing an array of inputs
  • Each input requires pairAddress, networkId, and optionally tokenOfInterest and durations
  • Use tokenOfInterest (token0 or token1) to specify which token’s perspective for buy/sell metrics
  • Available durations: min5, min15, hour1, hour4, hour12, day1, week1, day30
  • Stats are returned in fields like stats_hour1, stats_day1 based on requested durations
  • More efficient than multiple getDetailedPairStats calls when querying several pairs

Troubleshooting Tips

getDetailedPairsStats (plural) accepts an array of pair inputs, allowing you to fetch stats for multiple pairs in a single request. getDetailedPairStats (singular) only accepts one pair at a time.
You can query multiple pairs in one request, but for best performance keep the batch size reasonable. Very large batches may timeout or be rate-limited.
Yes, each pair input can specify its own durations array. This lets you request hourly stats for one pair and daily stats for another in the same query.
Batching multiple pairs into one request reduces API overhead and improves performance. It’s especially useful for dashboards displaying stats for multiple pairs simultaneously.