# Spot

## Public

**Security: None**

## Test Connectivity

<mark style="color:blue;">`GET`</mark> `https://openapi.darkex.com/sapi/v1/ping`

This endpoint checks connectivity to the host

{% tabs %}
{% tab title=" 200: OK Connection normal" %}
{}
{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

## Check Server Time

GET <https://openapi.xxx.xx/sapi/v1/time>

<mark style="color:blue;">`GET`</mark> `https://openapi.darkex.com/sapi/v1/time`

This endpoint checks connectivity to the server and retrieves server timestamp

{% tabs %}
{% tab title="200: OK Successfully retrieved server time" %}

```json5
{
"timezone": "GMT+08:00",
"serverTime": 1595563624731
}
```

{% endtab %}
{% endtabs %}

## Pairs List

[GET https://openapi.darkex.com/sapi/v1/symbols](#public)

{% tabs %}
{% tab title="200:OK" %}

```json5
{
"symbols": [
{
```

{% endtab %}
{% endtabs %}

**weight(IP/UID): 1**

**Response**:

| symbol             | string  | BTCUSDT | Name of the symbol                      |   | Currency to name  |
| ------------------ | ------- | ------- | --------------------------------------- | - | ----------------- |
| baseAsset          | string  | BTC     | Underlying asset for the symbol         |   | base currency     |
| quoteAsset         | string  | USDT    | Quote asset for the symbol              |   | The base currency |
| pricePrecisio n    | integer | 2       | Precision of the price                  |   | Price Accuracy    |
| quantityPrec ision | integer | 6       | Precision of the quantity               |   | Quantity accuracy |
| limitAmount Min    | String  | 100     | Limit order minimum order amount quote  |   |                   |
| limitPriceMin      | String  | 100     | Minimum price of a limit order          |   |                   |
| limitVolume Min    | String  | 100     | Limit order minimum order quantity base |   |                   |
| baseAssetN ame     | String  | BTC     | Base Currency Display Name              |   |                   |
| quoteAssetN ame    | String  | USDT    | Quote Currency                          |   |                   |

|             |        |          | Display                       |   |   |
| ----------- | ------ | -------- | ----------------------------- | - | - |
| SymbolNam e | String | BTC/USDT | TNraamdieng Pair Display Name |   |   |

### Market

**Security Type: None**

### Depth

[GET](#id-200-ok-connection-normal) <https://openapi.darkex.com/sapi/v1/depth>

market detpth data

**Query Parameters**

| Name     | Type    | Description              |
| -------- | ------- | ------------------------ |
| limit    | integer | Default 100; Max 100     |
| symbol\* | String  | Symbol Name E.g. BTCUSDT |

{% tabs %}
{% tab title="200: OK Successfully retrieved market depth data" %}

```json5
{
"bids": [ [
"3.90000000",
"431.00000000"
], [
"4.00000000",
"431.00000000"
]
],
"asks": [ [
"4.00000200",
"12.00000000"
], [
"5.10000000",
"28.00000000"
]
]
// price
// vol
// price
// vol
}
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 5**

**Response**:

| time | long | 1595563624731 | Current timestamp (ms)                                          |
| ---- | ---- | ------------- | --------------------------------------------------------------- |
| bids | list | ;             | List of all bids, best bids first. See below for entry details. |
| asks | list | ;             | List of all asks, best asks first. See below for entry details. |

The fields bids and asks are lists of order book price level entries, sorted from best to worst.

| ' ' | float | 131.1 | price level                                       |
| --- | ----- | ----- | ------------------------------------------------- |
| ' ' | float | 2.3   | The total quantity of orders for this price level |

### 24hrs ticker

[GET](#public) <https://openapi.darkex.com/sapi/v1/ticker>

24 hour price change statistics.

**Query Parameters**

| Name     | Type   | Description               |
| -------- | ------ | ------------------------- |
| symbol\* | String | Symbol Name. E.g. BTCUSDT |

{% tabs %}
{% tab title="200: OK Successfully retrieved ticker data" %}

```json5
{
"high": "9279.0301",
"vol": "1302",
"last": "9200",
"low": "9279.0301",
"rose": "0",
"time": 1595563624731
}
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 5**

**Response**:

| time | long  | 1595563624731 | Open Time    |   |
| ---- | ----- | ------------- | ------------ | - |
| high | float | 9900          | High Price   |   |
| low  | float | 8800.34       | Low Price    |   |
| open | float | 8700          | Open Price   |   |
| last | float | 8900          | Last Price   |   |
| vol  | float | 4999          | Trade Volume |   |

|   |   |   | Price increase |   |
| - | - | - | -------------- | - |

### Recent Trades List

[GET](#public) <https://openapi.darkex.com/sapi/v1/trades>

**Query Parameters**

| Name     | Type   | Description                       |
| -------- | ------ | --------------------------------- |
| symbol\* | String | Symbol Name. E.g. BTCUSDT         |
| limit    | String | Default 100; Max 1000Responses200 |

{% tabs %}
{% tab title="200: OK" %}

```json5
{
"list":[
{
"price":"3.00000100",
"qty":"11.00000000", "time":1499865549590,
"side":"BUY"
}
]
}
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 5**

**Response**:

| price | float | 0.055         | The price of the trade |   |
| ----- | ----- | ------------- | ---------------------- | - |
| time  | long  | 1537797044116 | Current timestamp (ms) |   |
| qty   | float | 5             | The quantity traded    |   |

### Kline/candlestick data

[GET](#public) <https://openapi.darkex.com/sapi/v1/klines>

**Query Parameters**

| Name                 | Type   | Description                                                                                                                                                                                                                                                                                                             |
| -------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| symbol\*             |        | Symbol Name. E.g. BTCUSDT                                                                                                                                                                                                                                                                                               |
| interval\*           | String | <p>Interval of the Kline. Possible values include:</p><p>1min , 5min , 15min , 30min ,</p><p><img src="https://2977076273-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fpdh0hfl1NGGwxsAUpbzn%2Fuploads%2FQBBh3SccljWySugHNfhS%2F6.png?alt=media" alt=""></p><p>60min , 1day , 1week , 1mont h</p> |
| Default 100; Max 300 | String | Default 100; Max 300Responses200                                                                                                                                                                                                                                                                                        |
| startTime            | long   | <p>startTime</p><p>example: 1538728740000</p>                                                                                                                                                                                                                                                                           |
| endTime              | long   | <p>endTime</p><p>example: 1538728740000</p>                                                                                                                                                                                                                                                                             |

{% tabs %}
{% tab title="200: OK" %}

```json5
[
{
"high": "6228.77",
"vol": "111",
"low": "6228.77",
"idx": 1538728740000,
"close": "6228.77",
"open": "6228.77", "id":1538728740
},
{
"high": "6228.77",
"vol": "222",
"low": "6228.77",
"idx": 1538728740000,
"close": "6228.77",
"open": "6228.77", "id":1538728740
},
{
"high": "6228.77",
"vol": "333",
"low": "6228.77",
"idx": 1538728740000,
"close": "6228.77",
"open": "6228.77", "id":1538728740
}
]
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 1**

**Response**:

| idx   | long  | 1538728740000 | <p>Open time</p><p>（ms）</p> |   |
| ----- | ----- | ------------- | --------------------------- | - |
| open  | float | 36.00000      | open price                  |   |
| close | float | 33.00000      | close price                 |   |
| high  | float | 36.00000      | high price                  |   |
| low   | float | 30.00000      | low price                   |   |
| vol   | float | 2456.111      | volume                      |   |

**Trade**

**Security Type: TRADE**

Endpoints under **Trade** require an API Key and a signature

### New Order

[POST](#public) <https://openapi.darkex.com/sapi/v1/order>

**Rate Limit: 100times/2s**

**Query Parameters**

| Name        | Type    | Description  |
| ----------- | ------- | ------------ |
| X-CH-SIGN   | string  | Sign         |
| X-CH-APIKEY | string  | Your API-key |
| X-CH-TS     | integer | timestamp    |

**Request Body**

| Name       | Type   | Description                                                                                                                           |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| symbol\*   | String | Symbol Name. E.g. BTCUSDT                                                                                                             |
| symbolName | String | <p>Currency display name: Either <strong>symbol</strong> or <strong>symbolName</strong> must be provided.</p><p>Example: BTC/USDT</p> |
| volume\*   | number | Order vol. For MARKET BUY orders, vol=amount.                                                                                         |
| side\*     | String | Side of the order, BUY/SELL                                                                                                           |
| type\*     | String | Type of the order, LIMIT/MARKET/FOK/POST\_O NLY/IOC                                                                                   |

| price\*          | number  | Order price, REQUIRED for LIMIT orders                  |
| ---------------- | ------- | ------------------------------------------------------- |
| newClientOrderId | String  | Unique order ID generated by users to mark their orders |
| recvwindow       | integer | Time window                                             |

{% tabs %}
{% tab title="200: OK Successfully post new order" %}

```json5
{
'symbol': 'LXTUSDT', 'orderId': 150695552109032492,
'orderIdString': '150695552109032492',//Character String Type Order ID 'clientOrderId': '157371322565051',
'transactTime': '1573713225668',
'price': '0.005452',
'origQty': '110',
'executedQty': '0',
'status': 'NEW',
'type': 'LIMIT',
'side': 'SELL'
}
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 5**

**Response**:

| orderId       | long   | <p>1506955521090</p><p>32492</p> | ID of the order                                                                                                                       |   |
| ------------- | ------ | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | - |
| clientorderId | string | 213443                           | A unique ID of the order.                                                                                                             |   |
| symbol        | string | BTCUSDT                          | Symbol Name                                                                                                                           |   |
| symbolName    | string | BTC/USDT                         | <p>Currency display name: Either <strong>symbol</strong> or <strong>symbolName</strong> must be provided.</p><p>Example: BTC/USDT</p> |   |

| transactTime | integer | 1273774892913 | Time the order is placed                  |   |
| ------------ | ------- | ------------- | ----------------------------------------- | - |
| price        | float   | 4765.29       | Time the order is placed                  |   |
| origQty      | float   | 1.01          | Quantity ordered                          |   |
| executedQty  | float   | 1.01          | Quantity of orders that has been executed |   |
| type         | string  | LIMIT         | <p>Order type</p><p>LIMIT,MARKET</p>      |   |
| side         | string  | BUY           | <p>Order side：</p><p>BUY, SELL</p>        |   |

### Test New Order

POST <https://openapi.darkex.com/sapi/v1/order/test>

Test new order creation and signature/recvWindow length. Creates and validates a new order but does not send the order into the matching engine.

**Headers**

| Name        | Type   | Description  |
| ----------- | ------ | ------------ |
| X-CH-APIKEY | String | Your API-key |
| X-CH-TS     | String | timestamp    |
| X-CH-SIGN   | String | Sign         |

**Request Body**

| Name    | Type   | Description                                         |
| ------- | ------ | --------------------------------------------------- |
| type\*  | String | <p>Type of the order,</p><p>LIMIT/MARKET</p>        |
| price\* | number | <p>Order price, REQUIRED for</p><p>LIMIT orders</p> |

| volume\*         | number  | Order vol. For MARKET BUY orders, vol=amount.                                          |
| ---------------- | ------- | -------------------------------------------------------------------------------------- |
| side\*           | String  | Side of the order, BUY/SELL                                                            |
| symbol\*         | String  | Symbol Name. E.g. BTCUSDT                                                              |
| symbolName       | String  | Currency display name: Either symbol or symbolName must be provided. Example: BTC/USDT |
| recvwindow       | integer | Time window                                                                            |
| newClientorderId | String  | Unique order ID generated by users to mark their orders                                |

{% tabs %}
{% tab title="200: OK Successfully test new order" %}

```json5
{
// Response
}
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 1**

### Batch Orders

[POST](#public) <https://openapi.darkex.com/sapi/v1/batchOrders>

**batch contains at most 10 orders**

**Headers**

| Name        | Type   | Description  |
| ----------- | ------ | ------------ |
| X-CH-APIKEY | String | Your API-key |
| X-CH-TS     | String | timestamp    |
| X-CH-SIGN   | String | Sign         |

**Request Body**

| Name       | Type   | Description                                                                            |
| ---------- | ------ | -------------------------------------------------------------------------------------- |
| orders     | number | The batch order information can contain a maximum of 10 records.                       |
| symbol\*   | String | Symbol Name. E.g. BTCUSDT                                                              |
| symbolName | String | Currency display name: Either symbol or symbolName must be provided. Example: BTC/USDT |
| symbolName | String | Currency display name: choose either **symbol** or **symbolName** to fill in.          |

{% tabs %}
{% tab title="200: OK" %}

```json5
{
"idsString": [ //Character String Type Order ID (Recommended) "165964665990709251",
"165964665990709252",
"165964665990709253"
],
"ids": [
165964665990709251,
165964665990709252,
165964665990709253
]
}
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 10**

**Resquest field**:

**orders**

| name   | type   | Example  | Description |
| ------ | ------ | -------- | ----------- |
| price  | folat  | 1000     | Price       |
| volume | folat  | 20.1     | Quantity    |
| side   | String | BUY/SELL | Direction   |

**Resquest**

| idsString | String  | “3213213” | <p>A collection of</p><p>order numbers of type String.</p> |
| --------- | ------- | --------- | ---------------------------------------------------------- |
| ids       | integer | 2100      | Collection of order numbers.                               |

### Query Order

[GET](#public)

<https://openapi.darkex.com/sapi/v1/order>

**Query Parameters**

| Name             | Type   | Description                                                                                                   |
| ---------------- | ------ | ------------------------------------------------------------------------------------------------------------- |
| orderId\*        | String | Order ID                                                                                                      |
| newClientorderId | String | <p>Client Order Id, Unique order ID generated by users to mark their orders. E.g.</p><p>354444heihieddada</p> |
| symbol\*         | String | Symbol Name. E.g. BTCUSDl                                                                                     |
| symbolName       | String | Currency display name: Either symbol or symbolName must be provided. Example: BTC/USDT                        |

**Headers**

| Name        | Type   | Description           |
| ----------- | ------ | --------------------- |
| X-CH-APIKEY | String | Your API-key          |
| X-CH-TS     | String | timestampResponses200 |
| X-CH-SIGN   | String | Sign                  |

{% tabs %}
{% tab title="200: OK" %}

```json5
{
'orderId': '499890200602846976',
'clientOrderId': '157432755564968', 'symbol': 'BHTUSDT',
'price': '0.01',
'origQty': '50',
'executedQty': '0',
'avgPrice': '0',
'status': 'NEW',
'type': 'LIMIT',
'side': 'BUY',
'transactTime': '1574327555669'
}
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 1**

**Response:**

| orderId       | long   | <p>1506955521090</p><p>32492</p> | Order ID (system generated)                                                                         |   |
| ------------- | ------ | -------------------------------- | --------------------------------------------------------------------------------------------------- | - |
| clientorderId | string | 213443                           | Order ID (sent by yourself)                                                                         |   |
| symbol        | string | BTCUSDT                          | Currency Pair Name                                                                                  |   |
| symbolName    | string | BTC/USDT                         | <p>Currency display name: Either symbol or symbolName must be provided.</p><p>Example: BTC/USDT</p> |   |
| price         | float  | 4765.29                          | Order Price                                                                                         |   |
| origQty       | float  | 1.01                             | Number of orders                                                                                    |   |
| executedQty   | float  | 1.01                             | Number of orders already filled                                                                     |   |

| avgPrice     | float  | 4754.24                     | Average price of orders already filled                                                                                                                                                                            |   |
| ------------ | ------ | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
| type         | string | limit                       | <p>The order</p><p>type LIMIT,MAR KET</p>                                                                                                                                                                         |   |
| side         | string | BUY                         | Order direction. Possible values can only be: BUY (buy long) and SELL (sell short)                                                                                                                                |   |
| status       | string | NEW                         | <p>Order status. Possible values are NEW (new order, no transaction), PARTIALLY\_FIL</p><p>LED (partially filled), FILLED (fully filled), CANCELED</p><p>(cancelled) and REJECTED</p><p>(order rejected).POST</p> |   |
| transactTime | string | <p>157432755566</p><p>9</p> | Order Creation Time                                                                                                                                                                                               |   |

### Cancel Order

POST <https://openapi.darkex.com/sapi/v1/cancel>

**Headers**

| Name        | Type   | Description  |
| ----------- | ------ | ------------ |
| X-CH-APIKEY | String | Your API-key |
| X-CH-TS     | String | timestamp    |

**Request Body**

| Name             | Type   | Description                                                                                                   |
| ---------------- | ------ | ------------------------------------------------------------------------------------------------------------- |
| newClientOrderId | String | <p>Client Order Id, Unique order ID generated by users to mark their orders. E.g.</p><p>354444heihieddada</p> |
| orderId\*        | String | Order ID                                                                                                      |
| symbol\*         | String | Symbol Name. E.g. BTCUSDT                                                                                     |
| symbolName       | String | Currency display name: Either symbol or symbolName must be provided. Example: BTC/USDT                        |

{% tabs %}
{% tab title="200: OK" %}

```json5
{
'symbol': 'BHTUSDT', 'clientOrderId': '0',
'orderId': '499890200602846976',
'status': 'CANCELED'
}
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 5**

**Response**:

| orderId       | long   | <p>1506955521090</p><p>32492</p> | ID of the order                                      |   |
| ------------- | ------ | -------------------------------- | ---------------------------------------------------- | - |
| clientorderId | string | 213443                           | Unique ID of the order.                              |   |
| symbol        | string | BTCUSDT                          | Name of the symbol                                   |   |
|               |        |                                  | The state of the order.Possible values include NEW , |   |

| status | string | NEW | <p>PARTIALLY\_FIL LED , FILLED , CANCELED , and REJECTED .POS</p><p>T</p> |
| ------ | ------ | --- | ------------------------------------------------------------------------- |

### Batch cancel orders

POST <https://openapi.darkex.com/sapi/v1/batchCancel>

**batch contains at most 10 orders**

**Headers**

| Name        | Type   | Description  |
| ----------- | ------ | ------------ |
| X-CH-APIKEY | String | Your API-key |
| X-CH-TS     | String | timestamp    |
| X-CH-SIGN   | String | Sign         |

**Request Body**

| Name       | Type   | Description                                                                                                     |
| ---------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| orderIds   | String | <p>Order ID collection</p><p>\[123,456] Responses200GET</p>                                                     |
| symbol\*   | String | Symbol Name. E.g. BTCUSDT                                                                                       |
| symbolName | String | The state of the order.Possible values include NEW , PARTIALLY\_FILLED , FILLED , CANCELED , and REJECTED .POST |

{% tabs %}
{% tab title="200: OK" %}

```json5
{
"success": [
165964665990709251,
165964665990709252,
165964665990709253
],
"failed": [ //cancel fails because the order does not exist or the ord 165964665990709250
]
}
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 10**

### Current Open Orders

[GET](#public)

<https://openapi.darkex.com/sapi/v1/openOrders>

**Query Parameters**

| Name     | Type   | Description               |
| -------- | ------ | ------------------------- |
| symbol\* | String | Symbol Name. E.g. BTCUSDT |
| limit    | String | Default 100; Max 1000     |

**Headers**

| Name        | Type   | Description  |
| ----------- | ------ | ------------ |
| X-CH-APIKEY | String | Your API-key |
| X-CH-TS     | String | timestamp    |
| X-CH-SIGN   | String | Sign         |

{% tabs %}
{% tab title="200: OK" %}

```json5
[
{
'orderId': 499902955766523648,
'orderIdString': '499902955766523648', //Character String Type Ord 'symbol': 'BHTUSDT',
'price': '0.01',
'origQty': '50',
'executedQty': '0',
'avgPrice': '0',
'status': 'NEW',
'type': 'LIMIT',
'side': 'BUY',
'time': '1574329076202'
},...
]
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 1**

**Response:**

| orderId       | long   | <p>1506955521090</p><p>32492</p>    | ID of the order                                                                                     |   |
| ------------- | ------ | ----------------------------------- | --------------------------------------------------------------------------------------------------- | - |
| orderIdString | string | <p>" 150695552109</p><p>032492"</p> | <p>Character String Type Order ID (Recommended</p><p>)</p>                                          |   |
| clientorderId | string | 213443                              | Unique ID of the order.                                                                             |   |
| symbol        | string | BTCUSDT                             | Name of the symbol                                                                                  |   |
| symbolName    | string | BTC/USDT                            | <p>Currency display name: Either symbol or symbolName must be provided.</p><p>Example: BTC/USDT</p> |   |
| price         | float  | 4765.29                             | Price of the order                                                                                  |   |

| origQty     | float  | 1.01         | Quantity ordered                                                                                                |   |
| ----------- | ------ | ------------ | --------------------------------------------------------------------------------------------------------------- | - |
| executedQty | float  | 1.01         | Quantity of orders that has been executed                                                                       |   |
| avgPrice    | float  | 4754.24      | Average price of filled orders.                                                                                 |   |
| type        | string | LIMIT        | <p>The order</p><p>type LIMIT,MAR KET</p>                                                                       |   |
| side        | string | BUY          | <p>The order side</p><p>BUY,SELL</p>                                                                            |   |
| status      | string | NEW          | The state of the order.Possible values include NEW , PARTIALLY\_FIL LED , FILLED , CANCELED , and REJECTED .GET |   |
|             |        | 157432755566 |                                                                                                                 |   |

### Trades

[GET](#public)

<https://openapi.darkex.com/sapi/v1/myTrades>

**Query Parameters**

| Name       | Type   | Description                                                                            |
| ---------- | ------ | -------------------------------------------------------------------------------------- |
| symbol\*   | String | Symbol Name. E.g. BTCUSDT                                                              |
| symbolName | String | Currency display name: Either symbol or symbolName must be provided. Example: BTC/USDT |
| limit      | String | Default 100; Max1000                                                                   |
| fromId     | String | Trade Id to fetch from                                                                 |

**Headers**

| Name        | Type   | Description  |
| ----------- | ------ | ------------ |
| X-CH-APIKEY | String | Your API-key |
| X-CH-TS     | String | timestamp    |
| X-CH-SIGN   | String | Sign         |

{% tabs %}
{% tab title="200: OK" %}

```json5
[
{
"symbol": "ETHBTC", "id": 100211,
"bidId": 150695552109032492,
"askId": 150695552109032493,
"price": "4.00000100",
"qty": "12.00000000",
"time": 1499865549590,
"isBuyer": true, "isMaker": false, "feeCoin": "ETH",
"fee":"0.001",
"bidUserId":23334, "askUserId":44112
},...
]
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 1**

**Response:**

| symbol | string  | BTCUSDT            | Name of the symbol    |
| ------ | ------- | ------------------ | --------------------- |
| id     | integer | 28457              | Trade ID              |
| bidId  | long    | 150695552109032492 | Bid Order ID          |
| askId  | long    | 150695552109032492 | Ask Order ID          |
| price  | integer | 4.01               | Price of the trade    |
| qty    | float   | 12                 | Quantiry of the trade |

| time      | number | 1499865549590 | timestamp of the trade                   |
| --------- | ------ | ------------- | ---------------------------------------- |
| isBuyer   | bool   | true          | <p>true = Buyer</p><p>false = Seller</p> |
| isMaker   | bool   | false         | <p>true =Maker</p><p>false =Taker</p>    |
| feeCoin   | string | ETH           | Trading fee coin                         |
| fee       | number | 0.001         | Trading fee                              |
| bidUserId | long   | 23334         | Buyer UID                                |
| askUserId | long   | 44112         | Seller UID                               |
|           |        |               |                                          |

### Account

**Security Type: USER\_DATA**

Endpoints under Account require an API-key and a signature.

### Account Information

GET

<https://openapi.darkex.com/sapi/v1/account>

**Headers**

| Name        | Type   | Description  |
| ----------- | ------ | ------------ |
| X-CH-APIKEY | String | Your API-key |
| X-CH-TS     | String | timestamp    |
| X-CH-SIGN   | String | Sign         |

{% tabs %}
{% tab title="200: OK Successfully retrieved account information." %}

```json5
{
'balances':
[
{
'asset': 'BTC',
'free': '0',
'locked': '0'
},
{
'asset': 'ETH',
'free': '0',
'locked': '0'
},...
]
}
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

**weight(IP/UID): 1**

**Response**:

| name     | type | description          |
| -------- | ---- | -------------------- |
| balances | \[]  | Show balance details |

field:

balances

| name   | type   | example | description                     |
| ------ | ------ | ------- | ------------------------------- |
| asset  | string | USDT    | Name of the asset               |
| free   | float  | 1000.30 | Amount available for use        |
| locked | float  | 400     | Amount locked (for open orders) |

[Margin](https://exchangedocsv2.gitbook.io/open-api-doc/english/margin)
