Pagination
All top-level API resources have support for bulk fetches via "list" API methods. For instance, you can list assets, list exchange tickers, and list GWA / MWA. These list API methods share a common structure, taking at least these three parameters: size
, timestamp
or startAfter
.
Brave New Coin API's utilise cursor-based pagination using the startAfter
parameter. The parameter should be an existing object ID and returns resources in reverse chronological order. The startAfter
parameter returns resources listed after the named resource. For APIs which take both a startAfter
and timestamp
parameters, the timestamp
is ignored if startAfter
is provided.
Arguments | Description |
size (Optional, default is 10) | The number of resources to be returned, between 1 and 2000. |
startAfter | A cursor for use in pagination. startAfter is an resource ID that defines your place in the list. |
timestamp | The timestamp to start searching from going backwards in time. |
List Response Format | Description |
content | An array containing the actual response elements, paginated by any request parameters. |
nextId | The value to be provided in the startAfter to get the next page. |