Skip to main content
ChainQuery uses three paging styles: There are no pagination headers. Everything is in the response body.

Cursor pagination (trades)

Every trade has an opaque cursor field. To fetch the next page:
  1. Take the cursor of the last trade in the current page.
  2. Send it as the cursor query parameter, with the same address, chain, order, from and to.
  3. Stop when a page has fewer items than limit (including an empty page).
There is no nextCursor or hasMore field.
How the cursor behaves:
  • The cursor is exclusive: the next page starts strictly after that trade in the chosen order (desc = older trades, asc = newer trades).
  • The cursor does not store the order or the query. Sent with a different order it seeks in the other direction, and sent with a different address it is just a position in time. Always reuse it with the same query.
  • from/to combine with the cursor, so you can page inside a time window.
  • Treat the cursor as opaque. Do not build or parse it. A malformed cursor returns 400 INVALID_PARAMETERS with cursor: invalid cursor. A cursor longer than 128 characters is also rejected with 400 INVALID_PARAMETERS, with a length message such as cursor: Too big: expected string to have <=128 characters.
  • Ordering is total and stable: by time, then block, transaction index, log index and trade id.
When address is a token, trades are merged from that token’s two most active pools (by 24h volume, then liquidity). Trades in its other pools are not included. Query a pool address to page through one specific pool.

Limit and offset (Pulse)

Pulse views take limit (1 to 100) and offset (0 to 500) per view. The deepest reachable result is position 600 (offset 500 + limit 100). To show a total or a page count, send the same body to POST /pulse/views/pagination. It returns the total number of matching tokens per view, which can be larger than what you can page to:
offset is only available over REST. The Pulse stream rejects offset greater than 0.

REST limits and defaults

A value outside its range returns 400 INVALID_PARAMETERS, for example limit: Too big: expected number to be <=100. Some limit-only routes also report a total so you can show “N of M”:
  • GET /token/markets returns totalCount, the number of the token’s pools with stats.
  • GET /wallet/holdings returns holdingsCount and totalBalanceUSD computed over all holdings that passed the filters, before limit is applied.

WebSocket limits

The channel WebSocket and the multi-events stream share these current defaults per connection: Details: WebSocket limits and errors, Multi-events limits and cost and, for the separate Pulse stream, Pulse stream.

Authentication and rate limiting

The REST API currently has no authentication and no rate limiting. No API key is required. This is expected to change before a production launch, so build in handling for 401, 403 and 429 responses.

Freshness

Responses carry no Cache-Control or ETag headers. Some data is cached briefly on the server, so repeated calls inside these windows can return the same values: For live data, use the WebSocket channels instead of polling.