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
Show Properties
Show Properties
FILTERED or UNFILTERED.
See TokenPairStatisticsTypeShow Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
address:networkId).token0.token1.Show Properties
Show Properties
address:networkId).ApeCoin.APE.Show Properties
Show Properties
A+, B-).ApeCoin.APE.A+, B-).Show Properties
Show Properties
protocol, company).Show Properties
Show Properties
token, stablecoin).Show Properties
Show Properties
ERC20, SPL).Show Properties
Show Properties
token, stablecoin).Show Properties
Show Properties
ERC20, SPL).Show Properties
Show Properties
address:id).Show Properties
Show Properties
Show Properties
Show Properties
address:networkId).Show Properties
Show Properties
address:networkId).Show Properties
Show Properties
address:networkId).ApeCoin.APE.Show Properties
Show Properties
A+, B-).ApeCoin.APE.A+, B-).Show Properties
Show Properties
protocol, company).Show Properties
Show Properties
token, stablecoin).Show Properties
Show Properties
ERC20, SPL).Show Properties
Show Properties
token, stablecoin).Show Properties
Show Properties
ERC20, SPL).Show Properties
Show Properties
address:id).Show Properties
Show Properties
Show Properties
Show Properties
address:networkId).Show Properties
Show Properties
address:networkId).Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Arguments
token0 or token1.
See TokenOfInterestday1: 6 buckets (4 hours each) plus 1 partial bucket duration hour12: 12 buckets (1 hour each) plus 1 partial bucket duration hour4: 8 buckets (30 min each) plus 1 partial bucket duration hour1: 12 buckets (5 min each) plus 1 partial bucket duration min5: 5 buckets (1 min each) plus 1 partial bucket For example, requesting 11 buckets for a min5 duration will return the last 10 minutes worth of data plus a snapshot for the current minute.FILTERED or UNFILTERED. Default is UNFILTERED.
See TokenPairStatisticsTypeExample
Test this query in the Explorer →{
getDetailedPairStats(
pairAddress: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"
networkId: 1
tokenOfInterest: token0
durations: [min5, hour1, hour4, hour12, day1]
) {
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
}
}
}
}
}
Usage Guidelines
- Query using
pairAddressandnetworkId(not the combined pair ID format) - Use
tokenOfInterest(token0ortoken1) to specify which token’s perspective to use for buy/sell calculations - Use
durationsarray to request specific time windows:min5,min15,hour1,hour4,hour12,day1,week1,day30 - Stats are returned in separate fields like
stats_hour1,stats_day1, etc. based on requested durations statsUsdcontains USD-denominated metrics (volume, buyVolume, sellVolume)statsNonCurrencycontains count metrics (transactions, buyers, sellers, buys, sells)- Each metric includes
currentValue,previousValue, andchange(percent change in decimal format) - Use
bucketsarray within each metric for granular time-series data
Troubleshooting Tips
What does tokenOfInterest affect?
What does tokenOfInterest affect?
tokenOfInterest determines the perspective for buy/sell classification. If set to token1, a “buy” means buying token1 (selling token0), and vice versa. This affects buyVolume, sellVolume, buyers, and sellers metrics.What's the difference between FILTERED and UNFILTERED statsType?
What's the difference between FILTERED and UNFILTERED statsType?
FILTERED stats exclude suspected bot/MEV activity to show organic trading. UNFILTERED includes all transactions. Use statsType in the response to see which type was returned.How do I use the buckets array?
How do I use the buckets array?
buckets array with values for sub-intervals within the duration. For example, stats_hour1 might have 12 buckets of 5 minutes each. Use the timestamps array to map bucket indices to time ranges.Why is change showing as null?
Why is change showing as null?
change field requires both currentValue and previousValue to calculate. For very new pairs or time windows with no previous data, change may be null.How do I get historical stats?
How do I get historical stats?
timestamp parameter to query stats as of a specific point in time. By default, stats are returned for the current time.How do I obtain historical liquidity data, token prices, and volumes for a pool?
How do I obtain historical liquidity data, token prices, and volumes for a pool?
getDetailedPairStats is the most accurate source of historical pool stats — pass the pairAddress, networkId, and the durations you need (min5, hour1, day1, etc.). getBars is also useful for OHLCV-style time series. Note that getTokenPrices returns a weighted price across all of a token’s pools — individual pool prices can differ.Related Recipes
- Discover Tokens: Build token discovery pages with trending data, filters, and search