# 6.2 Sổ lệnh điều kiện

<table data-header-hidden><thead><tr><th width="107"></th><th></th></tr></thead><tbody><tr><td><strong>url</strong></td><td><code>https://services.dnse.com.vn/conditional-order-api/v1/orders</code></td></tr><tr><td><strong>method</strong></td><td>GET</td></tr><tr><td><strong>header</strong></td><td>Authorization: Bearer &#x3C;token></td></tr><tr><td><strong>param</strong></td><td>accountNo:(String) Mã tiểu khoản<br>daily: (Boolean) Lấy lệnh trong ngày(true/false) - default là false<br>from: (String) ngày bắt đầu yyyy-MM-dd<br>to: (String) ngày kết thúc yyyy-MM-dd<br>page (Integer): số thứ tự trang<br>size (Interger): số lượng item trong trang<br>status (Array): trạng thái của lệnh (NEW/ACTIVATED/REJECTED/CANCELLED/EXPIRED/FAILED/CANCELLED_BY_RIGHTS_EVENT)<br>symbol (String): Mã<br>marketId: UNDERLYING (nếu lấy sổ lệnh điều kiện cơ sở) hoặc DERIVATIVES (phái sinh)</td></tr><tr><td><strong>request body</strong></td><td> </td></tr><tr><td><strong>success response body</strong></td><td><p><code>{</code> <br>    <code>"content": [</code><br>        <code>{</code> <br>            <code>"accountNo": "0001000006",</code><br>            <code>"category": "STOP",</code> <br>            <code>"condition": "price >= 26650",</code> <br>            <code>"createdAt": "2024-10-23T04:19:53.94801Z",</code>  <br>            <code>"createdBy": "064C000006",</code> <br>            <code>"id": "csc7iqa45sbpqutqm81g",</code> <br>            <code>"investorId": "0001000006",</code> <br>            <code>"metadata": {</code> </p><p>                 <code>"errorMessage": "",</code> <br>                 <code>"externalOrderId": 112,</code> <br>                 <code>"status": "OK"</code> <br>            <code>},</code><br>            <code>"props": {</code> <br>                 <code>"marketId": "UNDERLYING",</code> <br>                 <code>"stopPrice": 26650,</code> <br>                 <code>"trailingAmount": 0,</code> <br>                 <code>"trailingPercent": 0</code> <br>            <code>},</code> <br>            <code>"status": "ACTIVATED",</code> <br>            <code>"symbol": "HPG",</code> <br>            <code>"targetOrder": {</code> <br>                <code>"loanPackageId": 1531,</code>                  </p><p>                <code>"orderType": "LO",</code> <br>                <code>"price": 26600,</code> <br>                <code>"quantity": 100,</code> <br>                <code>"side": "NB"</code> <br>             <code>},</code><br>             <code>"timeInForce": {</code> <br>             <code>"expireTime": "2024-10-23T07:30:00Z",</code> <br>             <code>"kind": "GTD"</code> <br>             <code>},</code><br>             <code>"updatedAt": "2024-10-23T04:19:59.299943Z",</code><br>             <code>"updatedBy": "064C000006"</code> <br>         <code>},</code> <br>         <code>{</code> <br>             <code>"accountNo": "0001000006",</code> <br>             <code>"category": "STOP",</code><br>             <code>"condition": "price \u003c= 26650",</code> <br>             <code>"createdAt": "2024-10-23T04:18:18.971188Z",</code><br>             <code>"createdBy": "064C000006",</code> <br>             <code>"id": "csc7i2i45sbpqutqm80g",</code> <br>             <code>"investorId": "0001000006",</code> <br>             <code>"metadata": {</code> <br>                  <code>"errorMessage": "",</code> <br>                  <code>"externalOrderId": 102,</code> <br>                  <code>"status": "OK"</code> <br>         <code>},</code> <br>         <code>"props": {</code> <br>             <code>"marketId": "UNDERLYING",</code> <br>             <code>"stopPrice": 26650,</code> <br>             <code>"trailingAmount": 0,</code> <br>             <code>"trailingPercent": 0</code> <br>         <code>},</code> <br>         <code>"status": "ACTIVATED",</code> </p><p>         <code>"symbol": "HPG",</code> <br>         <code>"targetOrder": {</code> <br>            <code>"loanPackageId": 1531,</code> <br>            <code>"orderType": "LO",</code> <br>            <code>"price": 26600,</code> <br>            <code>"quantity": 100,</code> <br>            <code>"side": "NB"</code> <br>         <code>},</code> <br>         <code>"timeInForce": {</code> <br>             <code>"expireTime": "2024-10-23T07:30:00Z",</code> <br>             <code>"kind": "GTD"</code><br>         <code>},</code> </p><p>        <code>"updatedAt": "2024-10-23T04:18:26.831862Z",</code> </p><p>        <code>"updatedBy": "064C000006"</code><br>      <code>}</code> <br>  <code>],</code> <br>  <code>"page": 1,</code> <br>  <code>"size": 10000,</code> <br>  <code>"numberOfElements": 2,</code> <br>  <code>"totalElements": 2,</code> <br>  <code>"totalPages": 1</code> <br><code>}</code></p></td></tr><tr><td><strong>error response body</strong></td><td><p><code>{</code></p><p>  <code>"message": "Invalid signature"</code> </p><p><code>}</code></p></td></tr></tbody></table>

**Response body**

| Field                     | Type    | Description                                                                                                 |
| ------------------------- | ------- | ----------------------------------------------------------------------------------------------------------- |
| createdAt                 | String  | Thời gian tạo lệnh                                                                                          |
| createdBy                 | String  | Người tạo lệnh                                                                                              |
| id                        | String  | id của lệnh                                                                                                 |
| updatedAt                 | String  | Thời gian cập nhật lệnh                                                                                     |
| updatedBy                 | String  | Người cập nhật lệnh                                                                                         |
| status                    | String  | Trạng thái của lệnh                                                                                         |
| condition                 | String  | <p>Điều kiện đặt<br>price >= stopPrice<br>price <= stopPrice</p>                                            |
| targetOrder               | Object  |                                                                                                             |
| targetOrder.quantity      | Double  | Khối lượng đặt                                                                                              |
| targetOrder.side          | String  | Lệnh mua: NB, Lệnh bán:NS                                                                                   |
| targetOrder.price         | Doble   | Giá đặt, đơn vị đồng                                                                                        |
| targetOrder.loanPackageId | Integer | Mã gói vay, lấy gói vay muốn đặt từ api danh sách gói vay                                                   |
| targetOrder.orderType     | String  | <p>Loại lệnh, thuộc các giá trị sau:</p><ul><li>LO: lệnh giới hạn</li><li>MP/MTL: lệnh thị trường</li></ul> |
| symbol                    | String  | Mã                                                                                                          |
| props                     | Object  |                                                                                                             |
| props.stopPrice           | Double  | Giá trigger lệnh điều kiện                                                                                  |
| props.marketId            | String  | <p>lệnh cơ sở: UNDERLYING<br>Lệnh phái sinh: DERIVATIVES</p>                                                |
| accountNo                 | String  | Mã tiểu khoản                                                                                               |
| category                  | String  | STOP                                                                                                        |
| timeInForce               | Object  |                                                                                                             |
| timeInForce.expireTime    | String  | Thời gian hết hạn lệnh                                                                                      |
| timeInForce.kind          | String  | Loại : GTD                                                                                                  |
| page                      | Integer | Trang đã yêu cầu                                                                                            |
| size                      | Integer | Số lượng bản ghi trong trang đã yêu cầu                                                                     |
| numberOfElements          | Integer | Số lượng lệnh trong trang                                                                                   |
| totalElements             | Integer | Tổng số lượng lệnh có trong hệ thống                                                                        |
| totalPages                | Integer | Tổng số lượng trang có trong hệ thống                                                                       |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hdsd.dnse.com.vn/san-pham-dich-vu/lightspeed-api-truoc-krx/ii.-trading-api/6.-lenh-dieu-kien/6.2-so-lenh-dieu-kien.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
