Get active client orders [Private]

Get a list of client open orders by pair (e.g. BTC_USDT). Returns an array of order objects, newest first, 100 orders maximum, but not more than specified by the limit parameter.

📘

To call any private endpoint, headers should include authorization key(s).

You may use a single API key or a public-private key pair based on your current tasks. Here you may find typical Header configurations for both options.

Method name:/v4/order/private/active
Request type:GET

Data dictionary

NameTypeParameter typeRequiredRangeDescription
pairsstringQUERYNO-A trading pair as per the list from Get all traded markets endpoint.
limitintQUERYNO1-100Maximum amount of results in a response.
sortenumQUERYNOasc, descSort the resulting list newest-on-top (desc) or oldest-on-top (asc).
startstringQUERYNO-Show orders from this date. Time in ISO format. Default is 2 weeks ago.
endstringQUERYNO-Show orders up to this date. Time in ISO format. Defaults to the current time.

📘

You need to know:

Parameter pairs may take several arguments separated by commas, e.g. BTC_USDT,ETH_USDT,ETH_BTC. If not provided, returns all pairs.

Parameter limit defaults to 100 if not provided.

The maximum number of active orders - 100.

Parameter sort defaults to desc if not provided.

Exemplary request

First you will need to create a new order using Create a new order endpoint. Once done, please try these requests for a start:

Example pathDescription
/v4/order/private/active?limit=5Returns information about your last 5 active orders.
/v4/order/private/active?limit=5&pairs=BTC_USDTReturns information about your last 5 active orders in BTC_USDT pair which are sorted by "oldest-on-top".
/v4/order/private/active?sort=ascReturns information about all your active orders which are sorted by "oldest-on-top".
const apiKey = "YOUR_API_KEY"; // put here your Api key

const url = "https://api.kuna.io";
const path = "/v4/order/private/active?limit=5&pairs=BTC_USDT";
const options = {
  method: "GET",
  headers: {
    accept: "application/json",
    "Content-Type": "application/json",
    "api-key": apiKey,
  },
};

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

api_key = "YOUR_API_KEY"  # put here your Api key

url = "https://api.kuna.io"
path = "/v4/order/private/active?limit=5&pairs=BTC_USDT"
headers = {
    "accept": "application/json",
    "Content-Type": "application/json",
    "api-key": api_key,
}

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

How to call private endpoints here

Swagger here

Response

[
    {
      "id": "5992a049-8612-409d-8599-2c3d7298b106",            // Unique identifier of an order
      "type": "Limit",                                         // Type of an order
      "quantity": "5",                                         // Original order quantity
      "executedQuantity": "0",                                 // Traded quantity in stock (>0 if traded)
      "cumulativeQuoteQty": "0",                               // Traded quantity in money (>0 if traded)
      "cost": "0.05",                                          // Total amount
      "side": "Bid",                                           // Bid for buying base asset, Ask for selling base asset. FYI: For BTC_USDT trading pair, BTC is the base asset
      "pair": "TRX_USDT",                                      // Traded pair
      "price": "0.01",                                         // Price of the trade
      "status": "Open",                                        // The status of the order
      "createdAt": "2023-07-11T07:04:20.131Z",                 // Date-time of order creation, UTC
      "updatedAt": "2023-07-11T07:04:20.131Z"                  // Date-time of the last update of the order, UTC
    }
  ]