> ## Documentation Index
> Fetch the complete documentation index at: https://docs.raze.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination

> next → cursor on trades and holdings, offset on the screener, time on candles.

Lists that page answer `next`. Pass it back unchanged as `cursor`; stop when `next` is `null`.

The number of rows does not tell you where a list ends. A page can hold fewer rows than `limit`, even none, and still carry `next`, and a Solana trades page may hold more, when one transaction alone has more rows than `limit`. Keep walking until `next` is `null`.

```bash theme={null}
# page 1
curl -sS -H "x-api-key: $KEY" "$API/v1/tokens/sol/$MINT/trades?limit=200"

# page 2: the previous next, as is (URL-encoded)
curl -sS -G -H "x-api-key: $KEY" "$API/v1/tokens/sol/$MINT/trades" \
  --data-urlencode "limit=200" --data-urlencode "cursor=$NEXT"
```

## Which routes page, and how

| Route | How |
| - | - |
| `/v1/tokens/{chain}/{address}/trades` | `next` → `cursor`, newest first |
| `/v1/wallets/{chain}/{address}/trades` | `next` → `cursor`, newest first |
| `/v1/wallets/{chain}/{address}/holdings` | `next` → `cursor` |
| `/v1/screener` | `offset` (`offset=50` is the second page of 50) |
| `/v1/tokens/{chain}/{address}/candles` | By time: pass the oldest `time` you have as `to` |
| `/v1/tokens/{chain}/{address}/holders` | No pages: the top 100 |

Other lists (search, trending, launchpad boards, traders, top wallets) are one page: raise `limit` up to its maximum. A `limit` above the maximum is capped, not refused.

## Do not

* Decode, build or alter a `cursor`. It is opaque and may change shape; URL-encode it as you would any query value. A cursor the server can no longer honour answers **400**: start again from the first page. If a cursor keeps failing while the first page loads, start again from the first page too.
* Stop on a short page, or drop the cursor on a **503**. A Solana trades, wallet-trades or candles request may answer `503` with `Retry-After: 2`: send the same request again after it, with the same `cursor` (or `to`).
* Page a live view. A stream's `snapshot` already holds the latest page, and every change after it arrives as a frame; read older pages from REST only when the user scrolls back.

## Time ranges

| Route | Parameters |
| - | - |
| `/v1/tokens/{chain}/{address}/candles` | `from`, `to` in **milliseconds**; `to` defaults to now; `limit` ≤ 1000 |
| `/v1/wallets/{chain}/{address}/pnl` | `days` back from now (≤ 365), `resolution` `1d` or `1h` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.