Get public trades book [Public]

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.

Method name:/v4/trade/public/book/{pairs}
Request type:GET

📘

To increase the API rate limits, you can use a private endpoint: /v4/trade/private/book/

Data dictionary

NameTypeParameter typeRequiredRangeDescription
pairstringPATHYES-A trading pair as per the list from Get all traded markets endpoint
limitintQUERYNO1-100Maximum amount of results in a response

📘

Parameter limit defaults to 25 if not provided.

Exemplary request

Example pathDescription
/v4/trade/public/book/BTC_USDT?limit=5Returns the list of 5 new trades for BTC_USDT pair
/v4/trade/public/book/BTC_USDTReturns the list of 25 new trades for BTC_USDT pair
const url = "https://api.kuna.io";
const path = "/v4/trade/public/book/BTC_USDT?limit=5";
const options = {
  headers: {
    accept: "application/json",
  },
};

fetch(url + path, options)
  .then((response) => response.json())
  .then((showResponse) => console.log(showResponse.data));
import requests

url = "https://api.kuna.io"
path = "/v4/trade/public/book/BTC_USDT?limit=5"
headers = {
    "accept": "application/json"
}

request = requests.get(url + path, headers=headers)
print(request.json())

How to call public endpoints here

Swagger here

Response

{
    "id": "3e5591ba-2778-4d85-8851-54284045ea44",       // Unique identifier of a 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 
    "side": "Ask"                                       // Trade type: `Ask` or `Bid`. Bid for buying base asset, Ask for selling base asset (e.g. for BTC_USDT trading pair, BTC is the base asset).
}