Example
Test this query in the Explorer →Usage Guidelines
- Pass pair IDs as
address:networkId. For Uniswap V4 and other singleton pools, use the pool ID in place of the address - Up to 200 IDs per request. Results come back in the same order as
ids, one entry per ID, so you can match them by index. A repeated ID returns the pair again - An ID that isn’t a known pair returns
nullin its slot instead of failing the request. This includes an ID without a:networkIdsuffix, an unknown network, and a token address - EVM addresses match case-insensitively, so checksummed addresses work
- IDs can mix networks in one request
pairsreturns pair details: tokens, protocol, fee, tick spacing, creation time and pooled reserves. For prices, volume and liquidity, usegetDetailedPairsStats,pairMetadataorfilterPairs
Troubleshooting Tips
Why does a pair come back null?
Why does a pair come back null?
Check the ID format. It must be
address:networkId with a network that Codex indexes. A token address returns null, because pairs looks up pairs only. To find a token’s pairs, use listPairsForToken or filterPairs.How is this different from filterPairs(pairs:)?
How is this different from filterPairs(pairs:)?
filterPairs treats a token address in pairs as a request for that token’s top pairs, and returns ranked, filtered results with stats. pairs returns exactly the pairs you asked for, in your order, and never expands a token address.I get OUT_OF_RANGE: Too many pairs requested
I get OUT_OF_RANGE: Too many pairs requested
The request has more than 200 IDs. Split it into batches of 200 or fewer.