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 are served from market history with OceanX’s indexed trades merged on top. 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 resolutions can be served finer than requested. No market-data source publishes sub-minute EVM candles, so a sub-minute request on an EVM chain is served at the nearest finer supported bucket. Finer candles under a coarser label are still real trades; coarser ones would invent buckets that never existed. Compare resolutionSeconds against requestedResolutionSeconds to detect it. On Solana the two are always equal. 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.