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

# Pagination

> Cursor pagination, and the auto-paging helpers each SDK provides.

List endpoints are cursor-paginated. A page comes back as `{ data, has_more, next_cursor }`; pass `next_cursor` back as `cursor` to fetch the following page.

```bash theme={null}
curl "http://localhost:3000/v1/transactions?limit=100&cursor=$NEXT_CURSOR" \
  -H "Authorization: Bearer $MONEYLINE_API_KEY"
```

**data** `array` *required*

The rows for this page.

**has\_more** `boolean` *required*

Whether another page exists. Prefer this over checking whether `data` is full.

**next\_cursor** `string`

Opaque. Pass it back as `cursor`. Absent on the final page.

## Auto-paging

The TypeScript and Python SDKs hide the cursor loop entirely — iterate the list and it fetches pages as you go.

```ts TypeScript icon="https://mintcdn.com/paragon-f28ba471/UuDHN4B1J-v_DThS/images/lang/typescript.svg?fit=max&auto=format&n=UuDHN4B1J-v_DThS&q=85&s=cba1e12257cdbf42b6c7a23031def04f" theme={null}
// Iterate everything...
for await (const txn of client.transactions.list({ submission_id: id })) {
  console.log(txn.postedAt, txn.amount);
}

// ...or collect a bounded number.
const all = await client.transactions.list({ submission_id: id }).toArray();
const firstFifty = await client.transactions.list({ submission_id: id }).toArray(50);
const newest = await client.transactions.list({ submission_id: id }).first();
```

```python Python icon="https://mintcdn.com/paragon-f28ba471/UuDHN4B1J-v_DThS/images/lang/python.svg?fit=max&auto=format&n=UuDHN4B1J-v_DThS&q=85&s=a9a026d5d8b16735c0cea1b7dd0ac6e5" theme={null}
# Iterating the page object walks every page for you.
all_txns = list(client.transactions.list(submission_id=submission_id))

# Or stream, so a large result never lands in memory at once.
for txn in client.transactions.list(submission_id=submission_id):
    process(txn)
```

```go Go icon="https://mintcdn.com/paragon-f28ba471/UuDHN4B1J-v_DThS/images/lang/go.svg?fit=max&auto=format&n=UuDHN4B1J-v_DThS&q=85&s=338b141516fd81c7c6c2302fdf1e318b" theme={null}
// Go returns one page at a time.
page, err := client.Transactions.List(ctx, &moneyline.ListTransactionsParams{
	SubmissionID: id,
	Limit:        100,
})
// page.Data holds the rows; page.HasMore reports whether more remain.
```

> [!WARNING]
>
> **Go pagination is currently single-page.** `PaginatedResponse.Cursor` is
> deserialized from `cursor`, but the API sends the next cursor as `next_cursor`,
> so the field never populates and a cursor loop stops after the first page. Read
> `page.HasMore` and raise `Limit` until this is fixed.

## Choosing a page size

`limit` defaults to 25 and caps at 100. Larger pages mean fewer round trips but a slower first byte. For bulk export, 100 with auto-paging is usually right; for an interactive list, 25 keeps the first page fast.


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