Tokens
Get token price history
Average USD price and volume over time for the cross-chain asset a token belongs to, newest point first.
GET
Returns a price history series for a token. The series is stored per asset, ChainQuery’s cross-chain identity for a token (for example, one asset for USDC across every supported chain). The API looks up the token’s
There is no
Mixed resolution (no
Without
assetId and returns that asset’s history. Use it for line charts and sparklines. For candles, use GET /token/ohlcv.
If you already know the asset ID, GET /asset/history returns the same data.
Query parameters
Chain ID, as a number (
8453) or in evm:<id> form (evm:8453). See Chains and identifiers.Bucket size. One of
5m, 15m, 1h, 6h, 1d. Leave it out for a mixed-resolution series (see below).Start of the range, in Unix epoch milliseconds. Defaults to
to minus the default range for the period (see the table below). Must not be after to.limit parameter. A response holds at most 2000 points.
Default ranges
When you leave outfrom, the range is:
Mixed resolution (no period)
Without period, each point’s resolution depends on its age when you make the request:
This gives a detailed recent tail and a compact long-range series in one request.
Response
Behavior
- Newest first. Points are sorted by
datedescending. This is the opposite of the OHLCV endpoints, which return oldest first. Reverse the array before you draw a left-to-right chart. - 2000-point cap. If the range holds more than 2000 points, the oldest ones are dropped. A request without
periodover the default 365 days can lose its oldest part for a very active asset, because the last 24 hours are raw samples. Setperiod, or narrow the range, if you need the full span. - Averages, not closes.
priceUSDis the average over the bucket, so it won’t match thecof an OHLCV candle for the same time. - Cross-chain. Because the series belongs to the asset, the same token on two chains returns the same history.