> 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.7.-danh-sach-deal-nam-giu.md).

# 4.7. Danh sách deal nắm giữ

| Type | URL                                                                                                                                                                                                                                                                                  | Method |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ |
| Real | [https://services.entrade.com.vn/entrade-api/derivative/deals?\_end=\<endIndex>&\_start=\<startIndex>\&investorId=\<investorId>](https://services.entrade.com.vn/entrade-api/derivative/deals?_end=<endIndex>&_start=<startIndex>\&investorAccountId=<investorAccountId>)            | GET    |
| Demo | [https://services.entrade.com.vn/papertrade-entrade-api/derivative/deals?\_end=\<endIndex>&\_start=\<startIndex>\&investorId=\<investorId>](https://services.entrade.com.vn/entrade-api/derivative/deals?_end=<endIndex>&_start=<startIndex>\&investorAccountId=<investorAccountId>) | GET    |

#### **Query param**

| Fied           | Type | Description                                           |
| -------------- | ---- | ----------------------------------------------------- |
| **investorId** |      | Mã khách hàng                                         |
| **startIndex** |      | số index bắt đầu (deal đầu tiên bắt đầu từ index = 0) |
| **endIndex**   |      | số index kết thúc                                     |

#### &#x20;**Resquest header**

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

#### &#x20;**Resquest body**

| Fied    | Type | Description |
| ------- | ---- | ----------- |
| **N/A** |      |             |

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

| Fied     | Type      | Description            |
| -------- | --------- | ---------------------- |
| **data** | Deal List | Danh sách Deal nắm giữ |

#### **Deal**

| Fied                         | Type    | Description                                                                                            |
| ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------ |
| **id**                       | long    | Id deal                                                                                                |
| **symbol**                   | string  | Mã chứng khoán                                                                                         |
| **investorAccountId**        | string  | Số tiểu khoản                                                                                          |
| **status**                   | string  | <p>Trạng thái của deal, thuộc các giá trị sau: <br> </p><p>ACTIVE: đang mở </p><p>CLOSED: đã đóng </p> |
| **bankMarginPortfolioId**    | string  | mã gói vay                                                                                             |
| **side**                     | string  | <p>Bên mua/bán </p><p> </p><p>NB: mua </p><p>NS: bán </p>                                              |
| **secure**                   | Double  | cọc hiện tại của deal                                                                                  |
| **closedQuantity**           | integer | khối lượng đã đóng                                                                                     |
| **openQuantity**             | integer | Khối lương mở                                                                                          |
| **breakEvenPrice**           | Double  | Giá hoà vốn                                                                                            |
| **positionCostPrice**        | Double  | Giá vốn toàn bộ open quantity                                                                          |
| **averageCostPrice**         | Double  | Giá mở trung bình                                                                                      |
| **averageClosePrice**        | Double  | Giá đóng trung bình                                                                                    |
| **positionUnrealizedProfit** | Double  | Lãi mở (chưa bao gồm phí thuế)                                                                         |
| **unrealizedTotalTaxAndFee** | Double  | Phí thuế phần mổ                                                                                       |
| **positionRealizedProfit**   | Double  | Lãi đã đóng (chưa bao gồm phí thuế)                                                                    |
| **collectedInterestAndFee**  | Double  | Phí thuế phần đã đóng                                                                                  |
| **createdDate**              | Date    | Giờ tạo                                                                                                |
| **modifiedDate**             | Date    | Giờ cập nhật                                                                                           |

&#x20;
