Skip to main content

Returns

Arguments

Usage Guidelines

  • Maximum datapoints: 1500 per request
  • Use countback: 1500 with from: 0 for maximum results
  • Add removeEmptyBars: true to eliminate gaps in low-activity tokens
  • Use currencyCode: "TOKEN" for native token pricing instead of USD
  • For charting by Market cap: multiply price data by circulatingSupply from EnhancedToken
  • For volume, be sure to use volume instead of v. Due to large volume numbers exceeding max integer lengths, we needed to deprecate v in place of volume.

Troubleshooting Tips

Use getBars when you want price data for a specific trading pair. Use getTokenBars when you want aggregate price data for a token across all its trading pairs — it uses weighted average pricing based on liquidity.
Omit quoteToken parameter to auto-detect the correct base token of the pair automatically.
-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
Add symbolType: Token to your query. This is a common issue with four.meme tokens as their pair and token address is the same.
Our API fits right into TradingView’s library. You can find docs for integrating with TradingView at https://www.tradingview.com/free-charting-libraries/.
You can use getBars to do an initial fetch of bars and then subscribe to onBarsUpdated to keep it updated in real-time. More info on creating real-time charts is available here.
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.