Skip to main content
The ChainQuery REST API is a read-only HTTP API for on-chain DEX data: token details and stats, pools (markets), OHLCV candles, price history, trades, wallet holdings, search, and the Pulse token feed. For live updates, use the WebSocket API instead of polling.

Base URL

Every path on this page is relative to that base URL, unless stated otherwise.

Authentication

None. The API currently has no API keys, tokens or other authentication. Send plain HTTPS requests.

Request conventions

  • Methods. Almost every endpoint is a GET that takes its parameters in the query string. The few POST endpoints (batch market details and Pulse) take a JSON body. Send Content-Type: application/json with those. They return 200 on success, not 201.
  • Chains. Single-chain endpoints take a chain parameter as a numeric chain ID (8453) or in evm:<id> form (evm:8453). Chain names such as base are rejected. List parameters (chains) take a comma-separated list such as 1,8453 or evm:1,evm:8453. Data responses return chains as "evm:<id>" strings. The one exception is the /health/last-swaps status route, which returns numeric chainId values. See Chains and identifiers.
  • Addresses. Token and wallet addresses are 0x followed by 40 hex characters. Case doesn’t matter, and every address is lowercased before use and in responses.
  • Timestamps. from and to are Unix epoch milliseconds. A value in seconds is accepted but is read as a date in 1970. See Data formats.
  • Booleans. Boolean query parameters (for example fill) accept only the literal strings true and false.
  • Unknown parameters are ignored. Query keys that an endpoint doesn’t define are silently dropped, so a typo in an optional parameter name won’t cause an error. Check the parameter names carefully.
  • Leave unused parameters out. Don’t send empty values such as from=. An empty number is read as 0 and an empty enum fails validation.

Endpoint index

Tokens

Markets

Assets

Trades and wallets

Discovery

Pulse

These endpoints are documented in the Pulse tab.

Status

Response envelope

Successful responses wrap the result in an envelope:
data is an object or an array, depending on the endpoint. The /pulse/views endpoints are the only exception: they return their payload without the envelope. Errors use one shape across the API:
  • statusCode matches the HTTP status.
  • code is a stable, machine-readable error code. Branch on it rather than on message.
  • details appears on validation errors (HTTP 400), where it holds one { field, message } entry per problem. The /health/last-swaps status route also includes details (the freshness report) when it answers 503 SERVICE_UNAVAILABLE. Other errors have no details.
The codes you can receive, and when, are listed in Responses and errors. Limits and defaults for each endpoint are summarized in Pagination and limits.
An unsupported but well-formed chain ID (for example chain=137) passes validation on most endpoints. Depending on the endpoint, you get a 404 (nothing is indexed for it), empty results, or a 400. Use GET /protocols to see which chains are supported.

Try it in the docs

The API playground on each endpoint page sends requests through Mintlify’s proxy, so they work from the docs even though your browser isn’t calling the API directly.
Browser CORS is not guaranteed. The API doesn’t set CORS headers itself, so calls from a web page on another origin may be blocked by the browser. Call the API from your backend, or proxy requests through your own server, if you build a browser app.

Data freshness

The API reads ChainQuery’s indexed data. It doesn’t query the blockchain while it answers a request. Swaps are indexed as blocks arrive, and token and pool stats are recomputed in a background loop, so they can trail the latest swaps slightly. Some responses are also cached briefly on the server, as noted on each endpoint page. See How data flows.