The Bullish Trading API uses cursor-based pagination on endpoints that can return large collections of records. When an endpoint supports pagination, responses are wrapped in an envelope that contains both the result data and navigation links for moving through pages of results.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bullish-exchange/api-docs/llms.txt
Use this file to discover all available pages before exploring further.
How Cursor Pagination Works
Cursor pagination works by encoding a position in the result set into an opaque cursor string. Rather than requesting “page 3”, you follow thenext or previous link returned by the API, which carries the cursor for that position. This approach is stable even when records are being added or removed between requests.
The API provides four dedicated query parameters to control pagination behaviour. All pagination parameters begin with an underscore (_) to visually distinguish them from field-level filter parameters.
Pagination Query Parameters
| Parameter | Description |
|---|---|
_pageSize | Number of records per page. Allowed values: 5, 25, 50, 100. Defaults to 25. |
_metaData | Controls whether navigation links are included in the response. Set to true to guarantee links are returned. Defaults to false. |
_nextPage | Cursor pointing to the next page of results. Provided in a paginated response when _metaData=true. |
_previousPage | Cursor pointing to the previous page of results. Provided in a paginated response when _metaData=true. |
Navigation cursors (
_nextPage and _previousPage) are only included in the response when _metaData=true is explicitly set on the request. Always pass _metaData=true if you intend to paginate through results.Paginated Response Format
When pagination is active, the API wraps the result array in adata field and includes a links object containing URLs for the next and previous pages:
links.next and links.previous values are ready-to-use relative paths. Append them to the base URL https://api.exchange.bullish.com to construct the full request URL for the next or previous page.
Example: Fetching the First Page
The following request retrieves the first page of open BTCUSD orders with 5 results per page and metadata links enabled:Example: Walking Through Pages
To navigate to the next page, take the_nextPage cursor from the links.next value of the previous response and pass it as a query parameter:
_previousPage cursor from the links.previous value:
Combining Pagination with Filters
Pagination parameters and field filter parameters can be combined in the same request. The underscore prefix on pagination parameters (_pageSize, _metaData, _nextPage, _previousPage) ensures they are never confused with filter parameters such as status or symbol: