Usage Guidelines
- For data from mid-2025 onwards (timestamp 1753121580),
getTokenBarsreturns an aggregated price across all pools. Anything before that falls back to the top pair. - Historical data only includes OHLC data; volume/traders data cannot be aggregated across all pools on the fly.
- Includes more historical data than
getBarsbecause it iterates through top pairs rather than using a single pair. - Response time is slightly faster for current data, but the difference from
getBarsis negligible. - Refer to getBars for additional usage guidelines and troubleshooting tips.
Pricing for aggregate charts will no longer only use the top pair. Weighted average pricing will be used across a token’s top pairs, based on liquidity/recency, while filtering out lower quality pairs from contributing.
Troubleshooting Tips
When should I use getTokenBars vs getBars?
When should I use getTokenBars vs getBars?
Use
getTokenBars when you want aggregate price data for a token across all its trading pairs — it uses weighted average pricing based on liquidity. Use getBars when you want price data for a specific trading pair.Null or empty values returned
Null or empty values returned
- Check that your timestamp window is accurate and long enough for the resolution requested
- Ensure the token has started trading (we do not index tokens until trades occur)
- Use
removeLeadingNullValues: true
Updating charts in real-time
Updating charts in real-time
You can use
getTokenBars to do an initial fetch of bars and then subscribe to onTokenBarsUpdated to keep it updated in real-time. More info on creating real-time charts is available here.Incorrect values or errors returned with resolutions under 1m
Incorrect values or errors returned with resolutions under 1m
Our chart data for under 1m (
1S, 5S, 15S, 30S) only goes back 24 hours due to the volume of data required at those resolutions.