Pagination
If specified in the API documentation, an endpoint may return cursor paginated responses. Default page size is 25.
There are 4 special query parameters used to control the pagination behavior.
_pageSizecan be one of5, 25, 50, 100, default value is25_metaDatacan be false/true, if false the links are NOT part of the response. explicitly set_metaData=trueto guarantee links are returned._nextPagecursor to the next page. It is provided in the paginated response when_metaData=true._previousPagecursor to the previous page. It is provided in the paginated response when_metaData=true.
The paginated data is returned in the following wrapped format with generated links to the previous and next pages:
{
"data": [
{
"averageFillPrice": null,
"baseFee": "0.00000000",
"createdAtDatetime": "2018-11-18T00:00:00.000Z",
"createdAtTimestamp": "1639464207402",
"handle": null,
"margin": false,
"orderId": "390755652232282113",
"price": "8520.7000",
"quantity": "1.00000000",
"quantityFilled": "0.00000000",
"quoteAmount": "0.0000",
"quoteFee": "0.0003",
"side": "BUY",
"status": "OPEN",
"statusReason": "Open",
"statusReasonCode": "6001",
"stopPrice": null,
"symbol": "BTCUSD",
"timeInForce": "GTC",
"type": "LMT"
},
...
],
"links": {
"next": "/trading-api/v1/orders?_pageSize=5&symbol=BTCUSD&_nextPage=Mjk3NzM1MzQ5NDI0NjIwMDMy",
"previous": "/trading-api/v1/orders?_pageSize=5&symbol=BTCUSD&_previousPage=Mjk3NzM1Mzg3NzQ3OTc1Njgw"
}
}