Skip to main content
The GraphQL endpoint serves two root fields: candles, the OHLCV candles of one pool, and protocols, the list of protocols. It is a small subset of the REST surface: swaps, trader stats, tokens, holders and everything else are REST only. Use GraphQL when you want several candle series (and the protocol list) in one round-trip, and REST for everything else.

Endpoint

Authorization: Bearer ohlcv_live_sk_<your_key> works too. There is no hosted query builder: use any GraphQL client (or curl) against this URL with your key header.

Schema

A GqlCandle has timestamp, pairAddress, tokenAddress, baseMint, timeframe, open, high, low, close, volumeSol, volumeToken, tradeCount, buyCount, sellCount and uniqueTraders: the fields of GET /api/v1/candles, with the same values and units, in GraphQL’s camelCase (volumeSol is REST’s volume_sol). A request reads at most about 10,000 candles in total. That’s the sum of limit over every candles in it, aliases included, so two aliases of 6000 are refused as one request. The exact ceiling is 10,500, shared with the request’s other fields. A limit outside 1–10000 is refused with limit must be <= 10000 (or limit must be positive), as it is on REST.
candles returns candles oldest first, starting at start. Without start it starts at the pool’s first candle, so limit: 60 returns the pool’s oldest hour, not its latest. Pass start to get a recent window.

Sample queries

The last hour of 1-minute candles

Variables:

Two timeframes and the protocol list in one round-trip

Aliases (minute:, hourly:) let one request ask for the same field twice.
Variables:

The protocol list

Schema introspection

Standard GraphQL introspection works. From the command line:

Errors

An error inside a well-formed query comes back as HTTP 200 with the GraphQL errors array. A request body that is not valid JSON is rejected before it runs, with HTTP 400 and the REST error envelope (INVALID_PARAM).

When to use GraphQL vs REST