Skip to main content
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 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

string
required
Token contract address: 0x followed by 40 hex characters. Case-insensitive.
string
required
Chain ID, as a number (8453) or in evm:<id> form (evm:8453). See Chains and identifiers.
string
Bucket size. One of 5m, 15m, 1h, 6h, 1d. Leave it out for a mixed-resolution series (see below).
integer
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.
integer
End of the range, in Unix epoch milliseconds. Defaults to now.
There is no limit parameter. A response holds at most 2000 points.

Default ranges

When you leave out from, 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

string
Always "success".
object

Behavior

  • Newest first. Points are sorted by date descending. 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 period over the default 365 days can lose its oldest part for a very active asset, because the last 24 hours are raw samples. Set period, or narrow the range, if you need the full span.
  • Averages, not closes. priceUSD is the average over the bucket, so it won’t match the c of 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.
Tokens without an asset return 404. If the token isn’t linked to an asset (its assetId from GET /token is null), this endpoint returns 404 TOKEN_NOT_FOUND with Token or asset not found, even though the token exists. Check assetId first, and for tokens without one use GET /token/ohlcv for those: it works for any token with a pool.

Errors