# 4. Lấy danh sách gói vay

* **URL:**
  * PROD: <https://services.entrade.com.vn/entrade-api/investors/:investorId/derivative_margin_portfolios>
  * PAPERTRADE: <https://services.entrade.com.vn/papertrade-entrade-api/investors/:investorId/derivative_margin_portfolios>
* **Method:** `GET`
* **Description:** Lấy danh sách gói vay
* **Parameters:**
  * `investorId`: Mã investorId của Khách Hàng
* **Response:**

```
{
    "total": 1,
    "data": [
        {
            "id": 123,
            "bankId": 10001,
            "bankAccountId": 1000005,
            "name": "Gói kỹ quỹ 5%",
            "interestRate": 4.11E-4,
            "tradingFeeRate": 15750.0,
            "overdueInterestRate": 0.0,
            "loanTerm": 30,
            "maxLoanPool": 1.0E10,
            "coInvestTaxRate": 0.05,
            "createdDate": "2025-08-15T07:18:32.574Z",
            "modifiedDate": "2025-10-08T03:18:12.780Z",
            "closedPositionFee": 4.11E-4,
            "tradingTaxRate": 0.0,
            "portfolio": [
                {
                    "symbol": "VN30F1M",
                    "initialRate": 0.05,
                    "maintenanceRate": 0.03,
                    "liquidateRate": 0.02,
                    "overnightRate": 0.05,
                    "dailyStockBorrowFee": 0.0,
                    "withdrawalRate": 0.05,
                    "additionalRate": 0.05,
                    "companySecureRate": 0.2,
                    "vsdSecureRate": 0.17,
                    "bankSecureRate": 0.2
                },
                {
                    "symbol": "VN30F2M",
                    "initialRate": 0.05,
                    "maintenanceRate": 0.03,
                    "liquidateRate": 0.02,
                    "overnightRate": 0.05,
                    "dailyStockBorrowFee": 0.0,
                    "withdrawalRate": 0.05,
                    "additionalRate": 0.05,
                    "companySecureRate": 0.2,
                    "vsdSecureRate": 0.17,
                    "bankSecureRate": 0.2
                }
            ],
            "assetManagementOvernightFee": 0.0,
            "autoAdvanceRealizedProfit": true,
            "displaySymbols": [
                "VN30F2512"
            ]
        }
    ]
}
```

* **Mô tả (các field quan trọng):**
  * `id`: mã id của gói vay
  * `name`: tên mô tả gói vay
  * `interesRate`: lãi vay/ lãi qua đêm
  * `tradingFeeRate`: phí giao dịch
  * `closedPositionFee`: phí đóng mở trong ngày
  * `autoAdvanceRealizedProfit`: có tự đồng tính lãi đã chốt vào sức mua hay không
  * `coInvestTaxRate`: phần trăm thuế
  * `portfolio`: Chi tiết gói vay theo mã
    * `symbol`: Mã phái sinh
    * `initialRate`: tỉ lệ cọc ban đầu
    * `maintenanceRate`: tỉ lệ cọc duy trì
    * `liquidrate`: tỉ lệ cọc xử lý
    * `overnightRate`: tỉ lệ cọc duy trì qua đêm


---

# 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/4.-lay-danh-sach-goi-vay.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.
