Postman collection of Kuna v4 API
Types of parameters you might need to use when interacting with Kuna v4 API
You may find our Postman collection useful for an easy start.
The Postman collection also includes documentation that you may find in our API references:
Using variables
You may see a common pattern in the examples, masking parameters behind variables, e.g. {{TRADED_ORDER_ID}}.
This concept is used to save time and avoid errors when using API endpoints, which may use same parameters, output of one request may be a parameter of another one, etc.
The most common is {{baseURL}} in every endpoint:
{{baseURL}}/v4/order/private/create, which refers to the dev or production server's base URL that should be used for making the request,
or
{{OPEN_ORDER_ID}} in the body of the request, which refers to a unique id of an open order:
{
"orderId": "{{OPEN_ORDER_ID}}"
}Import collection into Postman
To import Postman collection, please open Postman >> create new or go to your Kuna workspace >> click Collections >> click Import >> click Raw text >> paste the code from below >> click Continue:
Postman collection
{
"info": {
"_postman_id": "8c31c0ad-17ff-4e67-8e8c-416bd0a9dfd1",
"name": "KUNA PRO REST API v4",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "4335195"
},
"item": [
{
"name": "v4",
"item": [
{
"name": "markets/public",
"item": [
{
"name": "Get all traded markets [Public]",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/v4/markets/public/getAll",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"markets",
"public",
"getAll"
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
},
"description": "Get the list of all the traded pairs on Kuna exchange. Returns an array of objects, each with the `pair` string, the tickers of both base and quoted asset alongside their precisions.\n\nThis is a `public` route, no need for authorization.\n\n### Data dictionary\n > 📘 This endpoint does not take any parameters. \n\n### Exemplary request\nPlease try sending this request: `{{baseURL}}/v4/markets/public/getAll`\n\n### Response structure\nYou will receive a JSON in the response with `data` object, filled with an array of `pairs` objects structured like this example:\n````\n{\n \"pair\": \"BCH_BTC\", // Traded pair of assets\n \"baseAsset\": { // The base asset of the traded pair, the one to sell or buy as a result of the trade\n \"code\": \"BCH\",\n \"precision\": 8 // Maximum amount of digits for the decimal part of a number\n },\n \"quoteAsset\": { // The quoted asset of the traded pair, the one to use to sell or buy the base asset \n \"code\": \"BTC\",\n \"precision\": 8 // Maximum amount of digits for the decimal part of a number\n },\n \"tickerPriceChange\": \"0\" // TBD\n}\n___CODE_BLOCK_2___`\n[\n \{\n \"pair\": \"BTC_USDT\", // Traded pair\n \"percentagePriceChange\": \"1\", // Relative price change, in percent \n \"price\": \"19999\", // Current median price\n \"equivalentPrice\": \"\", // TBD\n \"high\": \"20163\", // Highest price\n \"low\": \"19883\", // Lowest price\n \"baseVolume\": \"32.131491000001674\", // Traded volume as base \n \"quoteVolume\": \"642635.7276489848\", // Traded volume as quote\n \"bestBidPrice\": \"19975\", // The best bid price now\n \"bestAskPrice\": \"19976\", // The best ask price now\n \"priceChange\": \"19999\" // Absolute price change\n },\n {\n \"pair\": \"ETH_BTC\", // The following pair was not traded yesterday\n \"percentagePriceChange\": \"0\",\n \"price\": \"0\",\n \"equivalentPrice\": \"\",\n \"high\": \"0\",\n \"low\": \"0\",\n \"baseVolume\": \"0\",\n \"quoteVolume\": \"0\",\n \"bestBidPrice\": \"0\",\n \"bestAskPrice\": \"0\",\n \"priceChange\": \"0\"\n }\n]\n````\n### Errors\n| Error code | Message | Parameter | Description |\n|:-------------------:|:-------:|:-----------:|-----------------------------------------------------------------|\n| Empty \\`data\\` object | - | `pairs` | Have to send at least one pair to receive a meaningful response |"
},
"response": [
{
"name": "response",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "api-key",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/v4/markets/public/tickers?symbols=BCH_BTC",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"markets",
"public",
"tickers"
],
"query": [
{
"key": "symbols",
"value": "BCH_BTC"
}
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"data\": [\n {\n \"marketCode\": \"labore tempor esse eu\",\n \"baseVolume\": -75659516.21744928,\n \"bestAskPrice\": -2522528.3078294843,\n \"bestBidPrice\": -74708218.86268224,\n \"equivalentPrice\": -40613770.92977354,\n \"high\": 45296275.335223556,\n \"low\": 17138596.57962726,\n \"pair\": -74447402.40230829,\n \"percentagePriceChange\": 88350816.34157157,\n \"price\": -19876446.34740588,\n \"priceChange\": 24764511.884497777,\n \"quoteVolume\": -86956355.60091403\n },\n {\n \"marketCode\": \"ali\",\n \"baseVolume\": -19476406.889038205,\n \"bestAskPrice\": 76291555.44599718,\n \"bestBidPrice\": -9967912.558929637,\n \"equivalentPrice\": -77910184.75058697,\n \"high\": 17616028.70515415,\n \"low\": 53117871.3658745,\n \"pair\": -39091226.25047692,\n \"percentagePriceChange\": 23478891.66360098,\n \"price\": 18808572.20811571,\n \"priceChange\": 8165008.801359221,\n \"quoteVolume\": 30094159.151329964\n }\n ]\n}"
},
{
"name": "When an internal error occurred.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "api-key",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/v4/markets/public/tickers?symbols=BCH_BTC",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"markets",
"public",
"tickers"
],
"query": [
{
"key": "symbols",
"value": "BCH_BTC"
}
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "Internal Server Error",
"code": 500,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"errors\": [\n {\n \"message\": \"qui\",\n \"code\": \"su\"\n },\n {\n \"message\": \"sed Duis voluptate sint occaecat\",\n \"code\": \"minim velit\"\n }\n ]\n}"
}
]
}
]
},
{
"name": "order",
"item": [
{
"name": "private",
"item": [
{
"name": "cancel",
"item": [
{
"name": "Cancel one client order [Private]",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"orderId\": \"{{OPEN_ORDER_ID}}\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/v4/order/private/cancel",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"order",
"private",
"cancel"
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
},
"description": "Cancel an open order. Returns a success message if the target order was canceled as a result.\n\nThis is a `private` route, so the `api-key` parameter should be sent in the header.\n\n### Data dictionary\n| Name | Type | Parameter type | Required | Range | Description |\n|:-------:|:------:|:--------------:|:--------:|:-----:|:--------------------------------------------------------------------------------:|\n| orderId | string | BODY | YES | - | Should be a unique order id. For example, `c7fc5b2b-bd9d-48c1-a458-a83412669cf4` | \n\n### Exemplary request\nFirst you will need to create a new order using [Post a new order](#Post-a-new-order) endpoint. \nSend the uuid of the created order inside the body of the cancel request `{{baseURL}}/v4/order/private/cancel`:\n\n````\n{\n \"orderId\": \"{{OPEN_ORDER_ID}}\"\n}\n___CODE_BLOCK_4___`\n{\n \"success\": true\n}\n````\n### Errors\n| Error code | Message | Parameter-related | Description |\n|:---------------------:|:--------------------------------------------:|:-----------------:|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| WrongRequestException | orderId must be a UUID | orderId | The order id should match uuid pattern, for example, `c7fc5b2b-bd9d-48c1-a458-a83412669cf4` |\n| Internal Server Error | Invalid JSON | - | Expected a valid JSON in the body of request, but received something else. Recommend checking the structure, e.g. key-value pairs, quotes, etc. |\n| BAD_REQUEST | Order with status Closed can't be canceled | - | The order you tried to cancel has already been closed/traded |\n| BAD_REQUEST | Order with status Canceled can't be canceled | - | The order you tried to cancel has already been canceled |"
},
"response": [
{
"name": "response",
"originalRequest": {
"method": "POST",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "api-key",
"value": "<API Key>"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"orderId\": \"<number>\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/v4/order/private/cancel",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"order",
"private",
"cancel"
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"data\": {\n \"success\": true\n }\n}"
},
{
"name": "When the request data is invalid.",
"originalRequest": {
"method": "POST",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "api-key",
"value": "<API Key>"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"orderId\": \"<number>\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/v4/order/private/cancel",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"order",
"private",
"cancel"
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"errors\": [\n {\n \"message\": \"qui\",\n \"code\": \"su\"\n },\n {\n \"message\": \"sed Duis voluptate sint occaecat\",\n \"code\": \"minim velit\"\n }\n ]\n}"
},
{
"name": "When an internal error occurred.",
"originalRequest": {
"method": "POST",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "api-key",
"value": "<API Key>"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"orderId\": \"<number>\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/v4/order/private/cancel",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"order",
"private",
"cancel"
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "Internal Server Error",
"code": 500,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"errors\": [\n {\n \"message\": \"qui\",\n \"code\": \"su\"\n },\n {\n \"message\": \"sed Duis voluptate sint occaecat\",\n \"code\": \"minim velit\"\n }\n ]\n}"
}
]
},
{
"name": "Cancel multiple client orders [Private]",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Accept",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"orderIds\": [\n \"{{OPEN_ORDER_ID}}\",\n \"{{OPEN_ORDER_ID_2}}\",\n \"{{OPEN_ORDER_ID_3}}\"\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/v4/order/private/cancel/multi",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"order",
"private",
"cancel",
"multi"
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
},
"description": "Cancel several open orders at once. Returns confirmation upon success.\n\nThis is a `private` route, so the `api-key` parameter should be sent in the header.\n\n### Data dictionary\n| Name | Type | Parameter type | Required | Range | Description |\n|:--------:|:------:|:--------------:|:--------:|:-----:|:--------------------------------------------------------------------------------:|\n| orderIds | string | BODY | YES | - | Should be a unique order id. For example, `c7fc5b2b-bd9d-48c1-a458-a83412669cf4` |\n> 📘 If one or several orders from the batch have been traded or closed, the system will notify of this while still closing the remaining open orders. \n\n### Exemplary request\nPlease try this request for a start: `{{baseURL}}/v4/markets/public/getAll`\n\n### Response structure\nIf the whole orders batch was closed successfully, you should receive a JSON with `data` object, structured like this example:\n````\n{\n \"success\": true\n}\n___CODE_BLOCK_6___`JSON\nHTTP/1.1 200 OK\nContent-Type: application/json; charset=utf-8\n\n{\n \"id\": \"6ae80635-5434-4b85-a1c2-38856b50d295\", // Unique identifier of an order\n \"type\": \"Limit\", // Type of an order\n \"quantity\": \"0.01\", // Original order quantity\n \"executedQuantity\": \"0.00\", // Traded quantity is 0 if no trades \n \"pair\": \"BTC_USDT\", // Traded pair\n \"price\": \"16700\", // Price to trade\n \"status\": \"Open\", // The status of the order\n \"createdAt\": \"2022-10-01T12:08:55.444Z\", // Date-time of order creation, UTC\n \"startAt\": \"2022-10-01T12:08:55.444Z\", // Date-time of beginning order execution, UTC\n}\n````\n\nIf you also add `withTrades=true` and trades were executed for the order, then the `data` object will include `trades` array, for example: \n\n````JSON\nHTTP/1.1 200 OK\nContent-Type: application/json; charset=utf-8\n \n{\n \"id\": \"6ae80635-5434-4b85-a1c2-38856b50d295\", // Unique identifier of an order\n \"type\": \"Limit\", // Type of an order\n \"quantity\": \"0.01\", // Original order quantity\n \"executedQuantity\": \"0.01\", // Total traded quantity, if there were trades\n \"pair\": \"BTC_USDT\", // Traded pair\n \"price\": \"16700\", // Price to trade\n \"status\": \"Closed\", // The status of the order\n \"createdAt\": \"2022-10-01T12:08:55.444Z\", // Date-time of order creation, UTC\n \"startAt\": \"2022-10-01T12:08:55.444Z\", // Date-time of beginning order execution, UTC\n \"trades\": [\n {\n \"id\": \"73f4cf03-c79b-461f-9bbe-257c1c957073\", // Unique identifier of a trade\n \"orderId\": \"6ae80635-5434-4b85-a1c2-38856b50d295\", // Unique identifier of an associated order\n \"pair\": \"BTC_USDT\", // Traded pair\n \"quantity\": \"0.01\", // Traded quantity\n \"price\": \"19083\", // Traded price\n \"isTaker\": false, // ????????\n \"fee\": \"0.477075\", // Exchange commission fee\n \"feeCurrency\": \"0.477075\", // Currency of the commission !!! _Comment: bug reported_\n \"isBuyer\": false, // Buy or sell the base asset\n \"quoteQuantity\": \"190.83\", // Quote asset quantity\n \"createdAt\": \"2022-10-01T12:08:55.465Z\" // Date-time of trade execution, UTC\n }\n ]\n}\n___CODE_BLOCK_8___`json\n {\n \"type\": \"Limit\",\n \"orderSide\": \"Ask\",\n \"pair\": \"DAY_NIGHT\",\n \"quantity\": \"1\",\n \"price\": \"1\",\n \"amount\": \"1\"\n }\n ````\n \n ### Response structure\n You will receive a JSON in the response with `data` object, structured like this example:\n ````\n {\n \"id\": \"3e5591ba-2778-4d85-8851-54284045ea44\", // Unique identifier of an order\n }\n ___CODE_BLOCK_10___`\n[\n {\n \"id\": \"aa6bcfe9-a8ed-4980-9102-69f6a8d1985d\", // Unique identifier of an order\n \"type\": \"Limit\", // Type of an order\n \"quantity\": \"0.325\", // Original order quantity\n \"executedQuantity\": \"0.325\", // Traded quantity (>0 if traded)\n \"pair\": \"BTC_USDT\", // Traded pair\n \"price\": \"19936\", // Price to trade\n \"status\": \"Closed\", // The status of the order\n \"createdAt\": \"2022-10-04T11:44:04.808Z\", // Date-time of order creation, UTC\n \"startAt\": \"2022-10-04T11:44:04.808Z\" // Date-time of beginning order execution, UTC\n },\n {\n \"id\": \"e05e70a5-133d-47f6-9c53-578e8b7b444a\",\n \"type\": \"Limit\",\n \"quantity\": \"44.35\",\n \"executedQuantity\": \"0\",\n \"pair\": \"ETH_USDT\",\n \"price\": \"1349.7\",\n \"status\": \"Closed\",\n \"createdAt\": \"2022-10-04T11:53:22.725Z\",\n \"startAt\": \"2022-10-04T11:53:22.725Z\"\n }\n]\n````\n### Errors\n| Error code | Message | Parameter-related | Description |\n|:-------------------------:|:---------------------------------:|:-----------------:|-----------------------------------------|\n| ARGUMENT_VALIDATION_ERROR | take must not be greater than 100 | `limit` | Ensure `limit` is less or equals 100 |\n| WrongRequestException | sort must be a valid enum value | `sort` | Only `asc` or `desc` values are allowed |\n"
},
"response": [
{
"name": "response",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "api-key",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/v4/order/private/history?start=<number>&end=<number>&limit=<number>&sort=<string>&pairs=<string>",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"order",
"private",
"history"
],
"query": [
{
"key": "start",
"value": "<number>"
},
{
"key": "end",
"value": "<number>"
},
{
"key": "limit",
"value": "<number>"
},
{
"key": "sort",
"value": "<string>"
},
{
"key": "pairs",
"value": "<string>"
}
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"data\": [\n {\n \"type\": \"<string>\",\n \"status\": \"Open\",\n \"sn\": -32915706.574020967,\n \"quantity\": \"in in nostrud proident irure\",\n \"executedQuantity\": \"Ut ad\",\n \"pair\": \"dolor nulla\",\n \"price\": \"sint in\",\n \"createdAt\": \"1992-06-18T08:38:10.491Z\",\n \"startAt\": \"1943-09-04T23:33:59.643Z\",\n \"quoteQuantity\": \"in\",\n \"stopPrice\": \"dolore no\"\n },\n {\n \"type\": \"<string>\",\n \"status\": \"Expired\",\n \"sn\": -22040246.152549654,\n \"quantity\": \"tempor officia aliquip\",\n \"executedQuantity\": \"dolor sed\",\n \"pair\": \"exercitation mollit occaecat veni\",\n \"price\": \"aliqua\",\n \"createdAt\": \"1964-10-07T00:34:39.752Z\",\n \"startAt\": \"2001-03-14T02:42:09.820Z\",\n \"quoteQuantity\": \"commodo \",\n \"stopPrice\": \"consequat sint\"\n }\n ]\n}"
},
{
"name": "When the request data is invalid.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "api-key",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/v4/order/private/history?start=<number>&end=<number>&limit=<number>&sort=<string>&pairs=<string>",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"order",
"private",
"history"
],
"query": [
{
"key": "start",
"value": "<number>"
},
{
"key": "end",
"value": "<number>"
},
{
"key": "limit",
"value": "<number>"
},
{
"key": "sort",
"value": "<string>"
},
{
"key": "pairs",
"value": "<string>"
}
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"errors\": [\n {\n \"message\": \"qui\",\n \"code\": \"su\"\n },\n {\n \"message\": \"sed Duis voluptate sint occaecat\",\n \"code\": \"minim velit\"\n }\n ]\n}"
},
{
"name": "When an internal error occurred.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "api-key",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/v4/order/private/history?start=<number>&end=<number>&limit=<number>&sort=<string>&pairs=<string>",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"order",
"private",
"history"
],
"query": [
{
"key": "start",
"value": "<number>"
},
{
"key": "end",
"value": "<number>"
},
{
"key": "limit",
"value": "<number>"
},
{
"key": "sort",
"value": "<string>"
},
{
"key": "pairs",
"value": "<string>"
}
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "Internal Server Error",
"code": 500,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"errors\": [\n {\n \"message\": \"qui\",\n \"code\": \"su\"\n },\n {\n \"message\": \"sed Duis voluptate sint occaecat\",\n \"code\": \"minim velit\"\n }\n ]\n}"
}
]
},
{
"name": "Get trades by orderId [Private]",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/v4/order/private/:id/trades",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"order",
"private",
":id",
"trades"
],
"variable": [
{
"key": "id",
"value": "{{TRADED_ORDER_ID}}",
"description": "(Required) "
}
]
},
"description": "Get all the trades, associated with the order id. Returns an array of trades, if any were executed per the order.\n\nThis is a `private` route, so the `api-key` parameter should be sent in the header.\n\n### Data dictionary\n| Name | Type | Parameter type | Required | Range | Description |\n|------------|--------|:--------------:|:--------:|:-------------:|----------------------------------------|\n| id | string | PATH | YES | - | The UUID of the order to show details. |\n\n### Exemplary request\nTo fully utilize this endpoint, the checked order must have executed trades. You may trade with your open orders to accumulate enough data. \n\nPlease create a new order using [Create a new order](#Post-a-new-order) endpoint first and then create an opposing order (e.g. invert `type` to `Bid` if you created `Ask` first). \nThe trade should be executed within seconds.\n\nYou should receive an order id in the response when creating orders, please add it to the path of this request: `{{baseURL}}/v4/order/private/{{TRADED_ORDER_ID}}/trades`\n\n### Response structure\nYou will receive a JSON in the response with `data` object, structured like this example:\n\nURL: `{{baseURL}}/v4/order/private/e050c776-91e6-4c0d-b689-2415f2f74886/trades`\n````JSON\n[\n {\n \"id\": \"11de520f-6eeb-415f-a84f-1e6302962dcc\", // Unique identifier of a trade\n \"orderId\": \"e050c776-91e6-4c0d-b689-2415f2f74886\", // Unique identifier of an associated order\n \"pair\": \"BTC_USDT\", // Traded pair\n \"quantity\": \"0.6265\", // Traded quantity\n \"price\": \"20078\", // Traded price\n \"isTaker\": false, // ????????\n \"fee\": \"0.00156625\", // Exchange commission fee\n \"feeCurrency\": \"0.00156625\", // Curency of the commission !!!!!\n \"isBuyer\": true, // Buy or sell the base asset\n \"quoteQuantity\": \"12578.867\", // Quote asset quantity\n \"createdAt\": \"2022-10-04T15:33:10.046Z\" // Date-time of trade execution, UTC\n }\n]\n___CODE_BLOCK_12___`\n{\n \"asks\": [ // An array of sell orders\n [\n \"16950\", // Sell price, level 1\n \"0.001\" // Sell quantity, level 1\n ],\n [\n \"17000\", // Sell price, level 2\n \"0.01\" // Sell quantity, level 2\n ]\n ],\n \"bids\": [ // An array of buy orders\n [\n \"16700\", // Sell price, level 1\n \"0.01\" // Sell quantity, level 1\n ],\n [\n \"16000\", // Sell price, level 2\n \"0.001\" // Sell quantity, level 2\n ]\n ]\n }\n````\n### Errors\n| Error code | Message | Parameter | Description |\n|:----------------------:|:-----------------------------------------------------------------------------------------------:|:---------:|---------------------------------------------------------------------------------------------------------------------|\n| WrongRequestException | <font size=\"1\" level must be one of the following values: 5, 10, 20, 50, 100, 500, 1000 </font> | `level` | Ensure `limit` is within the provided range |\n| NotFoundException | Cannot GET /v4/trade/public/book?{pair} | `pair` | Sent `pair` as QUERY parameter, please send as PATH parameter instead. More info [here](#parameter-concepts-in-use) |"
},
"response": [
{
"name": "response",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v4/order/public/book/:pair?level=<string>",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"order",
"public",
"book",
":pair"
],
"query": [
{
"key": "level",
"value": "<string>"
}
],
"variable": [
{
"key": "pair",
"value": "<string>",
"description": "(Required) "
},
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"data\": {\n \"asks\": [\n [\n \"1950\",\n \"0.36\"\n ],\n [\n \"1950\",\n \"0.36\"\n ]\n ],\n \"bids\": [\n [\n \"1950\",\n \"0.36\"\n ],\n [\n \"1950\",\n \"0.36\"\n ]\n ]\n }\n}"
},
{
"name": "When the request data is invalid.",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v4/order/public/book/:pair?level=<string>",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"order",
"public",
"book",
":pair"
],
"query": [
{
"key": "level",
"value": "<string>"
}
],
"variable": [
{
"key": "pair",
"value": "<string>",
"description": "(Required) "
},
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"errors\": [\n {\n \"message\": \"qui\",\n \"code\": \"su\"\n },\n {\n \"message\": \"sed Duis voluptate sint occaecat\",\n \"code\": \"minim velit\"\n }\n ]\n}"
},
{
"name": "When an internal error occurred.",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v4/order/public/book/:pair?level=<string>",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"order",
"public",
"book",
":pair"
],
"query": [
{
"key": "level",
"value": "<string>"
}
],
"variable": [
{
"key": "pair",
"value": "<string>",
"description": "(Required) "
},
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "Internal Server Error",
"code": 500,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"errors\": [\n {\n \"message\": \"qui\",\n \"code\": \"su\"\n },\n {\n \"message\": \"sed Duis voluptate sint occaecat\",\n \"code\": \"minim velit\"\n }\n ]\n}"
}
]
}
]
},
{
"name": "trade",
"item": [
{
"name": "private",
"item": [
{
"name": "Get client trades history by filter [Private]",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/v4/trade/private/history?orderId={{TRADED_ORDER_ID}}",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"trade",
"private",
"history"
],
"query": [
{
"key": "pair",
"value": "{{TRADE_PAIR}}",
"disabled": true
},
{
"key": "orderId",
"value": "{{TRADED_ORDER_ID}}",
"description": "Better not provide both `pair` and `orderId`"
}
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
},
"description": "Get a list of trades by pair (e.g. BTC_USDT). Returns a list of your trades with details on each trade, newest first.\n\nThis is a `private` route, so the `api-key` parameter should be sent in the header.\n\n### Data dictionary\n| Name | Type | Parameter type | Required | Range | Description |\n|---------|--------|:--------------:|:--------:|:-----:|---------------------------------------------------------------|\n| pair | string | QUERY | NO | - | A trading pair as per the list from /v4/markets/public/getAll |\n| orderId | string | QUERY | NO | - | UUID of an order, to receive trades for this order only |\n\n> 📘️ If `pair` and `orderId` were not specified, returns the latest 10 trades for any trade pair and any order.\n\n### Exemplary request\nTo properly test this endpoint, you need to have trades under your account. The easiest way is to create 2 alike order of different order side (Ask/Bid) and let them close each other. Once done, please use this endpoint: `{{baseURL}}/v4/trade/private/history`\n\n### Response structure\nIn return you should receive a JSON with `data` object, structured like this example:\n````\n{\n \"id\": \"edb17459-c9bf-4148-9ae6-7367d7f55d71\", // Unique identifier of a trade \n \"orderId\": \"a80bec3f-4ffa-45c1-9d78-f6301e9748fe\", // Unique identifier of an order associated with the trade\n \"pair\": \"BTC_USDT\", // Traded pair\n \"quantity\": \"1.5862\", // Traded quantity\n \"price\": \"19087\", // Price of the trade\n \"isTaker\": true, // ????????\n \"fee\": \"0.0039655\", // Exchange commission fee\n \"feeCurrency\": \"0.0039655\", // Curency of the commission !!!!!\n \"isBuyer\": true, // Buy or sell the base asset\n \"quoteQuantity\": \"30275.7994\", // Quote asset quantity\n \"createdAt\": \"2022-09-29T13:43:53.824Z\" // Date of trade execution\n}\n___CODE_BLOCK_14___`\n{\n \"id\": \"3e5591ba-2778-4d85-8851-54284045ea44\", // Unique identifier of a trade\n \"sn\": \"2908\", // Serial number of the trade\n \"pair\": \"BTC_USDT\", // Market pair that is being traded\n \"quoteQuantity\": \"11528.8118\", // Qty of the quote asset, USDT in this example\n \"matchPrice\": \"18649\", // Exchange price at the moment of execution \n \"matchQuantity\": \"0.6182\", // Qty of the base asset, BTC in this example\n \"createdAt\": \"2022-09-23T14:30:41.486Z\", // Time of trade execution \n \"type\": \"Sell\" // Trade type: `Buy` or `Sell`\n}\n````\n### Errors\n| Error code | Message | Parameter-related | Description |\n|:-------------------------:|:---------------------------------------:|:-----------------:|----------------------------------------------------------------------------------------------------------------------|\n| ARGUMENT_VALIDATION_ERROR | take must not be greater than 100 | `limit` | Ensure `limit` is less or equals 100 |\n| NotFoundException | Cannot GET /v4/trade/public/book?{pair} | `pair` | Sent `pair` as QUERY parameter, please send as PATH parameter instead. More info [here](#parameter-concepts-in-use) |"
},
"response": [
{
"name": "response",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v4/trade/public/book/:pair?limit=<number>",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"trade",
"public",
"book",
":pair"
],
"query": [
{
"key": "limit",
"value": "<number>"
}
],
"variable": [
{
"key": "pair",
"value": "<string>",
"description": "(Required) "
},
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"data\": [\n {\n \"type\": \"Sell\",\n \"id\": \"consectetur fugiat sunt\",\n \"sn\": -68296993.87210946,\n \"pair\": \"veniam\",\n \"quoteQuantity\": \"officia esse culpa Duis ea\",\n \"matchPrice\": \"dolor\",\n \"matchQuantity\": \"exercitation cupidatat\",\n \"createdAt\": \"2005-03-13T00:04:40.698Z\"\n },\n {\n \"type\": \"Buy\",\n \"id\": \"id ut\",\n \"sn\": -79673857.86845087,\n \"pair\": \"irure\",\n \"quoteQuantity\": \"ipsum non cupidatat sunt\",\n \"matchPrice\": \"magna ea voluptate eu consequat\",\n \"matchQuantity\": \"fugiat veniam ea\",\n \"createdAt\": \"2017-08-28T07:44:21.134Z\"\n }\n ]\n}"
},
{
"name": "When the request data is invalid.",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v4/trade/public/book/:pair?limit=<number>",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"trade",
"public",
"book",
":pair"
],
"query": [
{
"key": "limit",
"value": "<number>"
}
],
"variable": [
{
"key": "pair",
"value": "<string>",
"description": "(Required) "
},
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"errors\": [\n {\n \"message\": \"qui\",\n \"code\": \"su\"\n },\n {\n \"message\": \"sed Duis voluptate sint occaecat\",\n \"code\": \"minim velit\"\n }\n ]\n}"
},
{
"name": "When an internal error occurred.",
"originalRequest": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/v4/trade/public/book/:pair?limit=<number>",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"trade",
"public",
"book",
":pair"
],
"query": [
{
"key": "limit",
"value": "<number>"
}
],
"variable": [
{
"key": "pair",
"value": "<string>",
"description": "(Required) "
},
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "Internal Server Error",
"code": 500,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"errors\": [\n {\n \"message\": \"qui\",\n \"code\": \"su\"\n },\n {\n \"message\": \"sed Duis voluptate sint occaecat\",\n \"code\": \"minim velit\"\n }\n ]\n}"
}
]
}
]
},
{
"name": "client/private",
"item": [
{
"name": "Get client balance [Private]",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/v4/private/getBalance",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"private",
"getBalance"
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
},
"description": "Review account wallets balance. Returns an array of the balances of all your wallets. \n\nThis is a `private` route, so the `api-key` parameter should be sent in the header.\n\n### Data dictionary\n> 📘 This endpoint does not take any parameters. \n\n### Exemplary request\nPlease use this endpoint: `{{baseURL}}/v4/private/getBalance`\n\n### Response structure\nYou will receive a JSON in the response with `data` object, structured like this example:\n````JSON\n[\n {\n \"currency\": \"UAH\", // Wallet currency\n \"balance\": \"7134.6\", // Available balance, precision depends on the currency\n \"lockBalance\": \"100\" // Minimum amount locked on the balance\n },\n {\n \"currency\": \"ETH\", // Wallet currency\n \"balance\": \"10929514.7810025\", // Available balance, precision depends on the coin\n \"lockBalance\": \"69922.041\" // Minimum amount locked on the balance\n },\n {\n \"currency\": \"BTC\", // Wallet currency\n \"balance\": \"9994849.763209032\", // Available balance, precision depends on the coin\n \"lockBalance\": \"5110.24204168\" // Minimum amount locked on the balance\n }\n]\n___CODE_BLOCK_16___`JSON\n{\n \"id\": \"93adcb31-a266-4c6e-98e8-5fc574cd230d\", // Unique identifier of the user\n \"fullName\": \"John Smith\", // Name of the user\n \"language\": \"en\", // Language preferences\n \"merchantId\": \"16324228-5ytc-5abc-4sra-c90259b21d4e\", // Unique merchant identifier\n \"referenceCurrency\": \"UAH\", // Reference currency for UI\n \"username\": \"john-smith-user\", // Username of the user\n \"verificationStatus\": \"accepted\", // User verification state\n \"confirmationSetting\": { // Indicates if a confirmation is sent in case of an action\n \"withdraw\": false // Confirmation of the withdrawal action (off in this case)\n },\n \"motificationSetting\": { // Indicates if a notification is sent in case of an event \n \"advertisement\": false, // Inform about new promos (off in this case)\n \"deposit\": false, // Inform about new deposits (off in this case)\n \"login\": false, // Inform about new login detection (off in this case)\n \"order\": false, // Inform about new order creation (off in this case)\n \"withdraw\": false // Inform about successful withdrawal (off in this case)\n }\n}\n````\n### Errors\n> 📘 As there are no parameters for this endpoint, you may encounter only general errors while using it."
},
"response": [
{
"name": "response",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "api-key",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/v4/private/me",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"private",
"me"
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"data\": {\n \"id\": \"non nisi\",\n \"fullName\": \"exercitation\",\n \"language\": \"quis nulla consequat\",\n \"merchantId\": \"non Lorem\",\n \"referenceCurrency\": \"Excepteur anim Ut consectetur\",\n \"username\": \"ex\",\n \"verificationStatus\": \"accepted\",\n \"confirmationSetting\": {\n \"withdraw\": false\n },\n \"motificationSetting\": {\n \"deposit\": false,\n \"order\": true,\n \"withdraw\": true,\n \"login\": false,\n \"advertisement\": false\n }\n }\n}"
},
{
"name": "When an internal error occurred.",
"originalRequest": {
"method": "GET",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "api-key",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/v4/private/me",
"host": [
"{{baseUrl}}"
],
"path": [
"v4",
"private",
"me"
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "{{BASE_URL_DEV}}",
"description": "Base url"
}
]
}
},
"status": "Internal Server Error",
"code": 500,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"errors\": [\n {\n \"message\": \"qui\",\n \"code\": \"su\"\n },\n {\n \"message\": \"sed Duis voluptate sint occaecat\",\n \"code\": \"minim velit\"\n }\n ]\n}"
}
]
}
]
}
]
}
],
"auth": {
"type": "apikey",
"apikey": [
{
"key": "value",
"value": "{{SINGLE_API_KEY}}",
"type": "string"
},
{
"key": "key",
"value": "api-key",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "BASE_URL_DEV",
"value": "rest-api-pro-dev.anuk.tech",
"type": "any"
},
{
"key": "baseUrl",
"value": "{{BASE_URL_DEV}}",
"type": "string"
}
]
}