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

# Paging

> One page per call. Send nextCursor back until hasMore is false.

A list answers one page:

```json theme={null}
{ "items": [ … ], "hasMore": true, "nextCursor": "c_…" }
```

* Send `nextCursor` back as `cursor` for the next page. Stop when `hasMore` is
  `false`.
* A cursor belongs to the query that produced it. Send it with the same
  parameters; with other parameters it answers `400 INVALID_ARGUMENT`.
* `limit` defaults to 50, at most 200. Post feeds, follow lists and trade lists
  default to 20, at most 100.
* A page boundary inside a tie of the order neither drops nor repeats a row.
* The entries of one board or ranking arrive whole, without paging.

```js theme={null}
const headers = { Authorization: `Bearer ${process.env.FOMOSCAN_KEY}` };
const wallets = [];
let cursor;

do {
  const url = new URL(`https://api.fomoscan.sh/v3/traders/${traderId}/wallets`);
  if (cursor) url.searchParams.set("cursor", cursor);
  const page = await fetch(url, { headers }).then((res) => res.json());
  wallets.push(...page.items);
  cursor = page.hasMore ? page.nextCursor : undefined;
} while (cursor);
```

> [!NOTE]
>
> Post feeds, follow lists and trade lists are priced per started 20 rows of
> `limit`, so a short page costs the same as a full one. Ask for the `limit` you
> will read.


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