> For the complete documentation index, see [llms.txt](https://hdsd2.entrade.com.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hdsd2.entrade.com.vn/entrade-api/tai-lieu-api-cu/4.-giao-dich-phai-sinh/4.5.-chi-tiet-lenh.md).

# 4.5. Chi tiết lệnh

| Type | URL                                                                                                                                                            | Method |
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
| Real | [https://services.entrade.com.vn/entrade-api/derivative/orders/\<orderId>](https://services.entrade.com.vn/entrade-api/derivative/orders/<orderId>)            | GET    |
| Demo | [https://services.entrade.com.vn/papertrade-entrade-api/derivative/orders/\<orderId>](https://services.entrade.com.vn/entrade-api/derivative/orders/<orderId>) | GET    |

#### **Path param**

| Field       | Type | Description  |
| ----------- | ---- | ------------ |
| **orderId** |      | Số hiệu lệnh |

#### &#x20;**Query param**

| Field  | Type | Description |
| ------ | ---- | ----------- |
| **NA** |      |             |

#### **Resquest header**

| Field             | Type | Description         |
| ----------------- | ---- | ------------------- |
| **Authorization** |      | Bearer \<JWT token> |

#### &#x20;**Response body**

| Field                     | Type                    | Description                                                                                                                                                                                                                                                                                                                                 |
| ------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **id**                    | integer                 | Số hiệu lệnh                                                                                                                                                                                                                                                                                                                                |
| **side**                  | string                  | <p>Lệnh Mua/Bán thuộc các giá trị sau: </p><p>- NB: Mua </p><p>- NS: Bán </p>                                                                                                                                                                                                                                                               |
| **investorAccountId**     | string                  | Số tiểu khoản                                                                                                                                                                                                                                                                                                                               |
| **investorId**            | string                  | Mã Khách hàng                                                                                                                                                                                                                                                                                                                               |
| **symbol**                | string                  | Mã                                                                                                                                                                                                                                                                                                                                          |
| **price**                 | number                  | Giá đặt                                                                                                                                                                                                                                                                                                                                     |
| **quantity**              | integer                 | Khối lượng đặt                                                                                                                                                                                                                                                                                                                              |
| **orderType**             | string                  | <p>Loại lệnh, thuộc các giá trị sau: </p><p>- LO: lệnh giới hạn </p><p>- MTL: lệnh thị trường </p><p>- ATC/ATO: lệnh khớp phiên định kỳ đóng cửa/mở cửa </p><p>- PLO: lệnh khớp lệnh sau giờ </p>                                                                                                                                           |
| **orderStatus**           | string                  | <p>Trạng thái lệnh, thuộc các giá trị sau đây: </p><p>- pending: chờ gửi </p><p>- pendingNew: chờ gửi </p><p>- new: chờ khớp </p><p>- partiallyFilled: khớp một phần </p><p>- filled: khớp toàn bộ </p><p>- rejected: bị từ chối </p><p>- expired: bị hết hạn trong phiên </p><p>- doneForDay: lệnh hết hiệu lực khi hết phiên </p><p> </p> |
| **fillQuantity**          | integer                 | Khối lượng đã khớp                                                                                                                                                                                                                                                                                                                          |
| **lastQuantity**          | <p>integer </p><p> </p> | Khối lượng của lần khớp gần nhất của lệnh                                                                                                                                                                                                                                                                                                   |
| **lastPrice**             | number                  | Giá khớp của lần khớp gần nhất của lệnh                                                                                                                                                                                                                                                                                                     |
| **averagePrice**          | double                  | Giá khớp trung bình của lệnh                                                                                                                                                                                                                                                                                                                |
| **createdDate**           | string                  | <p>Thời điểm (ngày giờ) đặt lệnh, theo định dạng ISO UTC 8601 format datetime </p><p> </p><p>Ví dụ: 2022-07-15T10:00:00.111+07:00 </p>                                                                                                                                                                                                      |
| **modifiedDate**          | string                  | Thời điểm (ngày giờ) thay đổi cuối cùng của lệnh                                                                                                                                                                                                                                                                                            |
| **bankMarginPortfolioId** | integer                 | Id gói vay                                                                                                                                                                                                                                                                                                                                  |
