# 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;


---

# 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://hdsd2.entrade.com.vn/entrade-api/tai-lieu-api-cu/4.-giao-dich-phai-sinh/4.7.-danh-sach-deal-nam-giu.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.
