{"_id":"56326e9ddf556c0d00cd08d9","__v":0,"project":"544fc17e698ab40800b4f891","category":{"_id":"56326e9ddf556c0d00cd08cb","version":"56326e9cdf556c0d00cd08ca","pages":["56326e9ddf556c0d00cd08d5","56326e9ddf556c0d00cd08d6","56326e9ddf556c0d00cd08d7","56326e9ddf556c0d00cd08d8","56326e9ddf556c0d00cd08d9"],"project":"544fc17e698ab40800b4f891","__v":1,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-28T16:17:02.556Z","from_sync":false,"order":0,"slug":"getting-started","title":"Getting Started"},"user":"544fc065698ab40800b4f888","version":{"_id":"56326e9cdf556c0d00cd08ca","project":"544fc17e698ab40800b4f891","__v":2,"createdAt":"2015-10-29T19:08:12.724Z","releaseDate":"2015-10-29T19:08:12.724Z","categories":["56326e9ddf556c0d00cd08cb","56326e9ddf556c0d00cd08cc","56326e9ddf556c0d00cd08cd","56326e9ddf556c0d00cd08ce","56326e9ddf556c0d00cd08cf","56326e9ddf556c0d00cd08d0","56326e9ddf556c0d00cd08d1","56326e9ddf556c0d00cd08d2","56326e9ddf556c0d00cd08d3","56326e9ddf556c0d00cd08d4","56d942ac337fd11300d6a251"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"collector","version_clean":"2.1.0","version":"2.1"},"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-05-22T04:14:27.900Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"All `GET` endpoints support pagination. Responses from such endpoints contain `meta` in the response body:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"meta\\\": {\\n   \\\"total_count\\\":42,\\n   \\\"next_page\\\":2,\\n   \\\"previous_page\\\":1\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nTo paginate a response, the following parameters should be provided:\n\n* **page** - Page number of the result set.\n* **per_page** - Optional. The number of items to return per page. Defaults to 10 and allows up to 100.\n\n A paginated request looks like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X GET \\\\\\n    -H 'Accept: application/json' \\\\\\n    \\\"https://coins.ph/api/v3/transfers?page=3&per_page=20\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n## buyorder and sellorder endpoint pagination\n\n`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`:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\\"meta\\\": {\\n  \\\"pagination\\\": {\\n    \\\"total\\\": 42,\\n    \\\"limit\\\": 10,\\n    \\\"offset\\\": 0\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nTo paginate a `buyorder` or `sellorder` request, these should be provided:\n\n* **limit** - The number of items to return per page.\n* **offset** - The number of items to skip before returning results up to `limit`. `offset` is relative to total.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X GET \\\\\\n    -H 'Accept: application/json' \\\\\\n    \\\"https://coins.ph/api/v2/buyorder?limit=10&offset=0\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"pagination","type":"basic","title":"Pagination"}
All `GET` endpoints support pagination. Responses from such endpoints contain `meta` in the response body: [block:code] { "codes": [ { "code": "\"meta\": {\n \"total_count\":42,\n \"next_page\":2,\n \"previous_page\":1\n}", "language": "json" } ] } [/block] 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. Defaults to 10 and allows up to 100. A paginated request looks like this: [block:code] { "codes": [ { "code": "curl -X GET \\\n -H 'Accept: application/json' \\\n \"https://coins.ph/api/v3/transfers?page=3&per_page=20\"", "language": "curl" } ] } [/block] ## 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`: [block:code] { "codes": [ { "code": "\"meta\": {\n \"pagination\": {\n \"total\": 42,\n \"limit\": 10,\n \"offset\": 0\n }\n}", "language": "json" } ] } [/block] 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. [block:code] { "codes": [ { "code": "curl -X GET \\\n -H 'Accept: application/json' \\\n \"https://coins.ph/api/v2/buyorder?limit=10&offset=0\"", "language": "curl" } ] } [/block]