All GET
endpoints support pagination. Responses from such endpoints contain meta
in the response body:
"meta": {
"total_count":42,
"next_page":2,
"previous_page":1
}
To paginate a response, the following parameters should be provided:
- page - Page number of the result set.
- per_page - Optional. The number of items to return per page. Usually defaults to 10 and allows up to 100. But, for technical reasons, not every endpoint behaves the same. E.g., lets you set the number of items to receive. Be sure to read the documentation on how to handle paginated results for specific endpoints.
A paginated request looks like this:
curl -X GET \
-H 'Accept: application/json' \
"https://api.coins.asia/v3/transfers?page=3&per_page=20"
buyorder and sellorder endpoint pagination
buyorder
and sellorder
endpoints are paginated differently. It uses limit
and offset
instead of using page
and per_page
. Responses from these GET
endpoints include the following meta
:
"meta": {
"pagination": {
"total": 42,
"limit": 10,
"offset": 0
}
}
To paginate a buyorder
or sellorder
request, these should be provided:
- limit - The number of items to return per page.
- offset - The number of items to skip before returning results up to
limit
.offset
is relative to total.
curl -X GET \
-H 'Accept: application/json' \
"https://coins.ph/api/v2/buyorder?limit=10&offset=0"