Skip to main content
GET /api/v1/market/chart/{token}
Returns OHLCV bars for a token — the same series the OceanX charts draw, from the same sources. Solana mints are served from OceanX’s own indexed trades, one volume-ranked pool per bucket. EVM tokens use native execution candles, with vendor gap filling on supported minute/hour/day intervals. Requires the md.read scope and uses the standard 120 requests per minute budget.
You do not need to compute a time range. With no from or to, you get the most recent limit buckets — ?resolution=1h&limit=24 is a day of hourly candles.

Query parameters

The {token} path segment is a base58 Solana mint, or a 0x token address when chain names an EVM chain. Passing the wrong kind of address for the chain returns invalid_token.

Request

An EVM token needs the chain parameter:

Response

Bars are ordered oldest first.

Response fields

Each bar:
ts is in milliseconds, but from and to are in seconds. Most OHLCV feeds use seconds throughout. OceanX keeps bar timestamps in milliseconds so they line up with the realtime stream; the window parameters stay in seconds. Mixing the two is the most common integration mistake here.

Things worth knowing

n is Solana-only. EVM history comes from market data that carries no trade count, so n is reported as 0 there rather than guessed. It is a real count on Solana. mode=mc needs a supply figure. Market cap is price × circulating supply. For a token with no known supply — wrapped SOL, for instance — mc returns the same values as price rather than erroring. EVM candles use the exact selected interval. This includes sparse seconds, 30m, 2h, 6h, 8h, 12h, Monday-based UTC weeks and calendar months beginning on the first UTC. resolutionSeconds equals requestedResolutionSeconds; month width is nominally 30 days in these numeric fields. Empty execution intervals stay empty, and a failed native read remains retryable. Native reads are bounded to 90 days, so a wider request may return partial history. The EVM reader follows numeric native Retry-After delays on its single warming retry, within the existing request deadline. Persistent failures remain retryable; they do not become successful empty history. denom=sol prices bars in SOL, but not volume. Each bar’s OHLC is divided by the SOL price of its own bucket; v stays in USD. It is Solana-only — requesting it on an EVM chain returns invalid_denom rather than quietly ignoring the parameter, because EVM bars are USD by construction.

Polling

Responses are cached briefly per token and resolution, and a request with no to is snapped to that same cache window. Polling faster than the bar width returns the same bars and costs you nothing extra — but it also tells you nothing new, so poll at roughly your resolution.

Errors

Standard error envelope. Specific to this endpoint:
This endpoint is read-only market data. It does not submit, simulate, or imply a trade.