Skip to main content

Tutorial overview

Pull historical OHLCV from a pool using start, limit, and interval, with tips for smoothing and inverted ratios.
Having trouble with the API? We’re here to help - drop us a line and we’ll get you sorted.

Why you need historical price data?

Building a crypto app? You’ll likely need price charts, volatility analysis, or backtesting data. That’s where OHLCV (Open, High, Low, Close, Volume) data comes in - it’s the backbone of any serious crypto application. Common use cases:
  • Price charts in trading apps
  • Backtesting trading strategies
  • Volatility analysis for risk management
  • Historical performance dashboards
  • Market research and analytics
Quick Start: If you know your token already, jump to Step 2 to grab the data immediately.

Step 1: Find your token’s trading pool

Here’s the thing - historical data comes from actual trading pools, not tokens directly. This makes sense because prices happen where people trade. The fastest way to find what you need using the Search API:
Pro tip: Search returns tokens, pools, and exchanges. Look for pools with high volume - they’ll have the most reliable price data.

If you have the token address

Skip the search and go straight to pools using pool search with the token_address filter:
The token_address filter only works on the per-network /networks/{network}/pools/search. The cross-network /pools/search accepts the parameter but silently ignores it.
Always pick pools with decent volume (>$10k daily). Low-volume pools can have weird price spikes that don’t reflect real market conditions.

Step 2: Get price history data

Now for the good stuff. Here’s how to pull historical OHLCV data using the Pool OHLCV API:
(Using USDC/ETH pool on Ethereum as example in this tutorial)

What these parameters do:

What you get back:

Each data point gives you everything you need for candlestick charts or analysis.

Time intervals that actually matter

Choose based on what you’re building: For Trading Apps:
  • 1m, 5m - Real-time trading
  • 1h, 4h - Swing trading
  • 24h - Position trading
For Analytics Dashboards:
  • 24h - Daily summaries
  • Use daily data and aggregate for weekly/monthly views
For Research:
  • 24h with longer date ranges (up to 1 year)

Production tips that’ll save you time

Cache aggressively

Historical data doesn’t change - cache it locally:

Handle data gaps

Some pools have quiet periods. Here’s how to deal with gaps:

Multi-pool strategy

For major tokens, cross-reference data from multiple pools:

Rate limiting

Don’t hammer the API. We suggest you to batch your requests and cache results:

Troubleshooting common issues

”Empty response”

Pool might not have data for your date range:

“Weird price spikes”

You hit a low-liquidity period. Switch to shorter intervals or higher-volume pools:

“Upside-down prices”

You need the inverted ratio:

What’s next?

Pool details API

Get liquidity, fees, and other pool metrics.

Real-time price feeds

Combine historical data with live prices.

FAQs

First check the pool’s created_at; set start to not precede the creation time.
For charts: 1h/24h. For anomaly smoothing: 6h/12h. For near real‑time: 1m/5m.
No trades occurred in that interval; aggregate longer or switch pools with higher activity.
Pass inversed=true to flip from token0/token1 to token1/token0.

Need help?

Discord community

Ask questions and see what others are building.

Direct support

Hit a wall? We’ll help you debug it.