What you’ll build
A USD price chart for any token on any of our networks, from one call per range. The candles are aggregated across every pool the token trades in, so you skip the step that usually comes first: finding the right pool and converting its pair price to dollars. By the end you will have:- A curl that returns hourly candles for a token
- A Python function that pulls a longer range in pages and returns a DataFrame
- A TypeScript version for a web chart
- A way to continue the same series live
Why a token series, not a pool series
A token rarely trades in one place. WETH on Ethereum sits in hundreds of thousands of pools in our index (summary.pools on the token), paired with stablecoins, with other majors and with long-tail tokens. Charting it from one pool has three problems:
- You have to choose the pool. The busiest one today may not be the busiest one next month, so a backtest built on it quietly changes venue.
- The price is in pair terms. A WETH/USDC pool prices WETH in USDC. A WETH/WBTC pool prices it in WBTC. You convert, or you only ever use stablecoin pairs.
- One pool’s volume is not the token’s volume. A single pool undercounts activity, often by a lot.
volume is the USD traded across all of them.
The call
Hourly WETH candles for the last 24 hours:- Host. Paid plans use
api-pro.dexpaprika.com. The key goes in theAuthorizationheader as the entire value, nothing in front of it. intervalandlimit. They default to24hand10. Leave them out and you get ten daily candles, which is rarely what a chart wants.
The response is an array of candles, oldest first. Here is UNI on Ethereum for three hours on 29 September, a fixed range you can repeat:
volume is the USD value traded in the token across all its pools during the candle, as a whole number.
Pull a longer range in Python
One request returns up to 1000 candles. A month of hourly candles fits in one call; a day of one-minute candles does not. This function walks forward in windows of 1000 candles until it reachesend:
On Dev,
start must be inside the last 30 days. Asking for more returns 403 with a message naming the plan that lifts the limit. Pro and Enterprise have no plan limit on history. The table is on OHLCV limits by plan.Chart it in TypeScript
The same call from a browser app or a server route. The candle shape maps directly onto most charting libraries:Three things that will surprise you
Quiet intervals have no candle. A candle exists only for an interval in which the token traded. On a large token at1h you will not notice; on a small token at 1m you will see gaps. Fill them on your side if your chart library needs a continuous axis, usually by carrying the previous close forward with zero volume.
The last candle may still be open. If the current interval has not ended, the last candle’s time_close is earlier than a full interval after time_open, and its values keep moving. Re-read it on your next poll instead of treating it as final.
This is not a pool price. On a token with a dominant pool the two series sit close together. Where liquidity is split, or one pool is thin, they can differ, and that difference is the point: the token series reflects where the volume actually traded.
Continue the series live
The same token candles are available as a stream on/sse/ohlcv, pushed as each bucket closes, on the same paid plans. Load history from this endpoint, then subscribe for new candles:
Where to go next
- Token OHLCV reference: every parameter and response code
- Pool OHLCV: one pool’s history, available on the free tier
- OHLCV limits by plan: intervals and history per plan
- Pricing and console.dexpaprika.com: plans and your key