get https://{BASE_URL_PROD}/v4/trade/public/book/
Get a list of trades by pair (e.g. BTC_USDT). Returns a list of trades, newest first, 100 trades maximum, but not more than specified by the limit
parameter.
This is a public
route, no need for authorization.
Data dictionary
Name | Type | Parameter type | Required | Range | Description |
---|---|---|---|---|---|
pair | string | PATH | YES | - | A trading pair as per the list from /v4/markets/public/getAll |
limit | int | QUERY | NO | 1-100 | Maximum amount of results in a response |
📘️ Parameter
limit
defaults to 25 if not provided.
Exemplary request
Please try this request for a start: {{baseURL}}/v4/trade/public/book/BTC_USDT?limit=10
Response structure
You will receive a JSON in the response with data
object, an array of trades objects, if more than one, structured like this example:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "3e5591ba-2778-4d85-8851-54284045ea44", // Unique identifier of a trade
"sn": "2908", // Serial number of the trade
"pair": "BTC_USDT", // Market pair that is being traded
"quoteQuantity": "11528.8118", // Qty of the quote asset, USDT in this example
"matchPrice": "18649", // Exchange price at the moment of execution
"matchQuantity": "0.6182", // Qty of the base asset, BTC in this example
"createdAt": "2022-09-23T14:30:41.486Z", // Date-time of trade execution, UTC
"type": "Sell" // Trade type: `Buy` or `Sell`
}
Errors
Status | Error code | Message | Parameter | Description |
---|---|---|---|---|
400 | ARGUMENT_VALIDATION_ERROR | take must not be greater than 100 | limit | Ensure 1 <= limit <= 100 |
400 | WrongRequestException | limit must be a positive number | limit | Received a negative number. Ensure 1 <= limit <= 100, has no whitespaces or others chars |
400 | WrongRequestException | limit must be a number conforming to the specified constraints | limit | Ensure 1 <= limit <= 100, has no whitespaces or others chars |
404 | NotFoundException | Cannot GET /v4/trade/public/book?{pair} | pair | Sent pair as QUERY parameter, please send as PATH parameter instead. More info here |