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

# API Pagination

> Understand cursor-based pagination in the TradeWatch financial data API. Navigate large result sets of market data efficiently using next and previous page cursors.

When querying historical financial data or large lists of instruments from the TradeWatch API, responses are paginated to keep individual payloads manageable. When handling large result sets, we use cursor-based pagination. This technique segments the results into pages of a defined size, allowing you to move forward and backward through the pages efficiently.

## Cursor Pagination

Our API uses cursor-based pagination provides the following fields in the response:

* `current_page`: The encoded cursor representing the current page
* `current_page_backwards`: The encoded cursor for the current page when navigating backwards
* `previous_page`: The encoded cursor for the previous page (null if you're on the first page)
* `next_page`: The encoded cursor for the next page (null if you're on the last page)

### Example Response

```json theme={null}
{
  // ...result data...
  "current_page": "Pg%3D%3D",
  "current_page_backwards": "PGR0OjIwMjUtMDMtMTMgMTA6NDY6MDQuMTE2MjQyKzAwOjAw",
  "previous_page": null,
  "next_page": "PmR0OjIwMjUtMDMtMTMgMTA6NDY6MDQuMTE2MjY1KzAwOjAw"
}
```

### How to Use Pagination

1. For the initial request, you don't need to provide any pagination parameters.
2. To retrieve the next page, use the value from `next_page` in your subsequent request.
3. To retrieve the previous page, use the value from `previous_page` in your subsequent request.
