SDKs
JavaScript/Typescript
Before Starting
Pagination

Pagination

TradrAPI uses pagination for all endpoints that return a list of items. The default page size is 10 items per page. Although not all endpoints which return multiple items currently support pagination, the TradrAPI project is working towards making all such endpoints support pagination.

Paginated responses will always be page based and will always be in this format:

interface PaginatedControllerResponse {
  // The list of items which are being paginated
  data: T[];
  // The current number of items per page being returned
  limit: number;
  // The number of the page being returned
  page: number;
  // The total number of items which can be queried
  total: number;
  // Any message related to the response
  message?: string;
}