When data sets are requested, we paginate results. Our pagination mechanism is cursor-based.
Endpoints with paginated results always include an optional cursor parameter. If the cursor is omitted, the first page of the result set is returned. Subsequent calls should return the cursor in the previous call's result set. This is important as the cursor changes over time as it encodes state information.
The page containing the final results in the sequence will not include a cursor.
This is how cursors should be handled in a 4 page data retrieval sequence:
The number of results returned is determined by the input parameter pageSize. The default value is 100. The minimum value is 1. The maximum value is 5000. Requesting a pageSize smaller than the allowed minimum or larger than the allowed maximum returns a 400 response code.
⚠️ pageSize may not be changed once data starts being retrieved. Changing it yield inconsistent results.
Paginated requests often take input values that affect the output data, both content and formatting, e.g., tokenAddress, quoteAddress, and scale. Most values can be changed between calls, but it almost never makes sense to do so.
If any input value other than pageSize may not be changed between calls, it will be noted in the endpoint documentation.