> ## Documentation Index
> Fetch the complete documentation index at: https://hoalulab.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

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

> Lấy danh sách gói vay theo investorId.



## OpenAPI

````yaml /vi/openapi/entrade-v1.yaml get /investors/{investorId}/derivative_margin_portfolios
openapi: 3.1.0
info:
  title: Entrade Open API
  version: 1.0.0
  description: Đặc tả được trích xuất từ các request Bruno trong `collections/Entrade`.
servers:
  - url: https://services.entrade.com.vn/entrade-api
    description: Môi trường production
  - url: https://services-staging.entrade.com.vn/papertrade-entrade-api
    description: Môi trường staging
security:
  - BearerAuth: []
tags:
  - name: authentication
    description: API đăng nhập và cấp JWT token.
    x-group: Xác thực
  - name: account
    description: Thông tin tài khoản, tài sản và cấu hình rủi ro.
    x-group: Tài khoản
  - name: derivatives
    description: Giao dịch, sức mua, gói vay và vị thế phái sinh.
    x-group: Phái sinh
  - name: smart-order
    description: Lệnh điều kiện trên dịch vụ Smart Order.
    x-group: Smart Order
paths:
  /investors/{investorId}/derivative_margin_portfolios:
    get:
      tags:
        - derivatives
      summary: Lấy danh sách gói vay
      description: Lấy danh sách gói vay theo investorId.
      operationId: listDerivativeMarginPortfolios
      parameters:
        - name: investorId
          in: path
          required: true
          description: Mã khách hàng
          schema:
            type: number
      responses:
        '200':
          description: Thành công
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarginPortfolioPage'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    MarginPortfolioPage:
      type: object
      properties:
        total:
          type: number
          description: Tổng số các gói vay
        data:
          type: array
          description: Danh sách các gói vay
          items:
            type: object
            properties:
              id:
                type: number
                description: Mã gói vay
              bankId:
                type: number
              bankAccountId:
                type: number
              name:
                type: string
                description: Tên gói vay
              interestRate:
                type: number
                description: Phí đóng vị thế
              tradingFeeRate:
                type: number
                description: Phí giao dịch lệnh
              overdueInterestRate:
                type: number
              loanTerm:
                type: number
              maxLoanPool:
                type: number
              coInvestTaxRate:
                type: number
                description: Phần trăm thuế
              createdDate:
                type: string
              modifiedDate:
                type: string
              closedPositionFee:
                type: number
                description: Phí giữ vị thế qua đêm
              tradingTaxRate:
                type: number
              portfolio:
                type: array
                description: Các mã áp dụng gói vay
                items:
                  type: object
                  properties:
                    symbol:
                      type: string
                      description: Mã
                    initialRate:
                      type: number
                      description: Tỷ lệ cọc ban đầu
                    maintenanceRate:
                      type: number
                      description: Tỷ lệ cọc duy trì
                    liquidateRate:
                      type: number
                      description: Tỷ lệ cọc xử lý
                    overnightRate:
                      type: number
                      description: Tỷ lệ cọc giữ qua đêm
                    dailyStockBorrowFee:
                      type: number
                    withdrawalRate:
                      type: number
                    additionalRate:
                      type: number
                    companySecureRate:
                      type: number
                    vsdSecureRate:
                      type: number
                    bankSecureRate:
                      type: number
              assetManagementOvernightFee:
                type: number
              autoAdvanceRealizedProfit:
                type: boolean
                description: Có tự động tính lãi đã chốt vào sức mua hay không
              displaySymbols:
                type: array
                items:
                  type: string
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        status:
          type: number
  responses:
    BadRequest:
      description: Yêu cầu không hợp lệ
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Lỗi máy chủ
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token lấy từ API đăng nhập.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.