Usage Guidelines
- Query multiple pairs in a single request by passing an array of inputs
- Each input requires
pairAddress,networkId, and optionallytokenOfInterestanddurations - Use
tokenOfInterest(token0ortoken1) 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_day1based on requested durations - More efficient than multiple
getDetailedPairStatscalls when querying several pairs
Troubleshooting Tips
How is this different from getDetailedPairStats?
How is this different from getDetailedPairStats?
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.What's the maximum number of pairs I can query?
What's the maximum number of pairs I can query?
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.
Can I request different durations for different pairs?
Can I request different durations for different pairs?
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.Why use this over separate queries?
Why use this over separate queries?
Batching multiple pairs into one request reduces API overhead and improves performance. It’s especially useful for dashboards displaying stats for multiple pairs simultaneously.