Skip to main content

Returns

TokenSparkline

Arguments

Usage Guidelines

  • Pass an array of token ids in the format tokenAddress:networkId to fetch sparklines for multiple tokens in one request
  • resolution specifies the candle size: 1S, 5S, 15S, 30S, 1 (1 min), 5, 15, 30, 60 (1 hour), 240, 720, 1D, 7D
  • Alternatively, use pointCount to specify the desired number of data points — the resolver will automatically choose the best resolution based on token age
  • Use from and to (unix timestamps) to specify a custom time range — defaults to the last 7 days
  • Set fillMissingBars: true to include empty bars with the previous bar’s value, ensuring consistent data density
  • The response includes {timestamp, value} pairs ideal for rendering lightweight price charts or sparkline visualizations

Troubleshooting Tips

Use tokenSparklines for lightweight, display-ready chart data — it returns simple {timestamp, value} pairs optimized for sparkline visualizations. Use getBars when you need full OHLCV candlestick data with volume, trade counts, and other detailed metrics.
Use pointCount for adaptive charts that automatically adjust resolution based on the token’s age and your desired data density. Use resolution when you need a specific candle size (e.g., hourly or daily). If both are provided, pointCount takes precedence.
By default, bars are only returned when there was trading activity. Set fillMissingBars: true to fill gaps with the previous bar’s value, which is useful for continuous chart displays.
Yes. Pass multiple token IDs in the ids array to batch-fetch sparklines for several tokens in a single request. Each token’s sparkline is returned as a separate object in the response array.