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

# Danh sách gói vay

> Truy vấn danh sách gói vay để đặt lệnh theo từng mã chứng khoán.

Với giao dịch cơ sở, trả về **tối đa 2 gói vay** bao gồm:

- Gói tiền mặt: Tỷ lệ ký quỹ tiền mặt 100%, không sử dụng tiền vay margin (`initialRate` = 1)
    
- Gói vay ký quỹ (margin): Tỷ lệ ký quỹ dưới 100%, có sử dụng đòn bẩy tiền vay margin (`initialRate` ≠ 1)
    

Với giao dịch phái sinh, tài khoản thường chỉ áp dụng **một gói vay duy nhất** cho tất cả các mã, với bộ tỷ lệ ký quỹ và phí cố định.



## OpenAPI

````yaml https://cdn.entrade.com.vn/dnse-openapi/doc/dnse-openapi-2026-05-07.yaml get /accounts/{accountNo}/loan-packages
openapi: 3.0.0
info:
  title: DNSE-OpenAPI-V2
  version: 1.0.0
  description: DNSE OpenAPI spec and tests
servers:
  - url: https://openapi-uat.dnse.com.vn
security: []
paths:
  /accounts/{accountNo}/loan-packages:
    parameters:
      - name: accountNo
        in: path
        required: true
        description: Số tiểu khoản
        deprecated: false
        schema:
          type: string
        example: '0001179019'
    get:
      tags:
        - account
      summary: Danh sách gói vay
      description: >-
        Truy vấn danh sách gói vay để đặt lệnh theo từng mã chứng khoán.


        Với giao dịch cơ sở, trả về **tối đa 2 gói vay** bao gồm:


        - Gói tiền mặt: Tỷ lệ ký quỹ tiền mặt 100%, không sử dụng tiền vay
        margin (`initialRate` = 1)
            
        - Gói vay ký quỹ (margin): Tỷ lệ ký quỹ dưới 100%, có sử dụng đòn bẩy
        tiền vay margin (`initialRate` ≠ 1)
            

        Với giao dịch phái sinh, tài khoản thường chỉ áp dụng **một gói vay duy
        nhất** cho tất cả các mã, với bộ tỷ lệ ký quỹ và phí cố định.
      parameters:
        - name: marketType
          in: query
          required: true
          description: |-
            Loại thị trường 
            - STOCK: Gói vay giao dịch cơ sở
            - DERIVATIVE: Gói vay giao dịch phái sinh
          deprecated: false
          schema:
            type: string
          example: DERIVATIVE
        - name: symbol
          in: query
          required: true
          description: Mã chứng khoán
          deprecated: false
          schema:
            type: string
          example: 41I1G4000
        - name: X-API-Key
          in: header
          required: true
          description: API Key được cấp khi đăng ký dịch vụ
          deprecated: false
          schema:
            type: string
          example: '{{apiKey}}'
        - name: X-Aux-Date
          in: header
          required: true
          description: Thời gian thực hiện yêu cầu
          deprecated: false
          schema:
            type: string
          example: '{{date}}'
        - name: X-Signature
          in: header
          required: true
          description: Chữ ký xác thực yêu cầu
          deprecated: false
          schema:
            type: string
          example: '{{signature}}'
        - name: version
          in: header
          description: 'Phiên bản API '
          schema:
            type: string
            format: date
          example: '2026-05-07'
      responses:
        '200':
          description: OK
          headers:
            Date:
              schema:
                type: string
              example: Wed, 18 Mar 2026 08:02:47 GMT
            Vary:
              schema:
                type: string
              example: Origin
            X-Ratelimit-Limit:
              schema:
                type: integer
              example: 300
            X-Ratelimit-Remaining:
              schema:
                type: integer
              example: 296
            X-Ratelimit-Reset:
              schema:
                type: integer
              example: 1773906557
            X-Tyk-Api-Expires:
              schema:
                type: string
              example: Thu, 02 Jan 3000 15:04:00 UTC
            Transfer-Encoding:
              schema:
                type: string
              example: chunked
          content:
            application/json:
              schema:
                type: object
                properties:
                  symbolType:
                    type: string
                    example: VN30F1M
                    description: >-
                      Phân loại mã hợp đồng phái sinh theo thời gian đáo hạn (áp
                      dụng cho DERIVATIVE)

                      - VN30F1M: HĐTL chỉ số VN30 1 tháng

                      - VN30F2M: HĐTL chỉ số VN30 2 tháng

                      - VN30F1Q: HĐTL chỉ số VN30 1 quý

                      - VN30F2Q: HĐTL chỉ số VN30 2 quý
                  marketType:
                    type: string
                    example: DERIVATIVE
                    description: |-
                      Loại thị trường
                      - STOCK: Gói vay giao dịch cơ sở
                      - DERIVATIVE: Gói vay giao dịch phái sinh
                  loanPackages:
                    type: array
                    description: Danh sách gói vay
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2279
                          description: Id gói vay
                          format: int32
                        name:
                          type: string
                          example: Gói giao dịch 02
                          description: Tên gói vay
                        initialRate:
                          type: number
                          example: 0.1848
                          description: Tỷ lệ ban đầu
                          format: double
                        maintenanceRate:
                          type: number
                          example: 0.1735
                          description: Tỷ lệ duy trì (call margin)
                          format: double
                        liquidRate:
                          type: number
                          example: 0.1731
                          description: Tỷ lệ xử lý (force sell)
                          format: double
                        tradingFee:
                          type: object
                          description: >-
                            Thông tin biểu phí phái sinh (áp dụng cho
                            DERIVATIVE)
                          properties:
                            id:
                              type: integer
                              example: 2404
                              description: Id chính sách phí phái sinh
                              format: int32
                            name:
                              type: string
                              example: 2000/HĐ
                              description: Tên chính sách phí
                            scope:
                              type: string
                              example: PRODUCT
                              description: Phạm vi áp dụng
                            channel:
                              type: string
                              example: ALL
                              description: Kênh áp dụng
                            schemaType:
                              type: string
                              example: FIXED
                              description: |-
                                Loại biểu phí
                                FIXED: Phí cố định
                                PROGRESSIVE: Phí lũy tiến
                            createdDate:
                              type: string
                              example: '2022-12-13T08:22:12.530837Z'
                              description: Thời điểm áp dụng
                              format: date-time
                            modifiedDate:
                              type: string
                              example: '2022-12-13T08:22:12.530837Z'
                              description: Thời điểm cập nhật
                              format: date-time
                            fixedTradingFee:
                              type: integer
                              example: 2000
                              description: Phí cố định trên 1 hợp đồng
                              format: int32
                            fixedDailyCloseTradingFee:
                              type: integer
                              example: 2000
                              description: Phí đóng vị thế trong ngày
                              format: int32
                            progressTradingFee:
                              type: array
                              description: Phí giao dịch lũy tiến
                              items:
                                type: object
                                properties:
                                  fromQuantity:
                                    type: number
                                    example: 1
                                    description: Khối lượng bắt đầu
                                    format: double
                                  toQuantity:
                                    type: number
                                    example: 2000
                                    description: Khối lượng kết thúc
                                    format: double
                                  fee:
                                    type: number
                                    example: 1500
                                    description: Mức phí
                                    format: double
                            progressDailyCloseTradingFee:
                              type: array
                              description: Phí đóng vị thế trong ngày lũy tiến
                              items:
                                type: object
                                properties:
                                  fromQuantity:
                                    type: number
                                    example: 2001
                                    description: Khối lượng bắt đầu
                                    format: double
                                  toQuantity:
                                    type: number
                                    example: 3000
                                    description: Khối lượng kết thúc
                                    format: double
                                  fee:
                                    type: number
                                    example: 2196
                                    description: Mức phí
                                    format: double
              example:
                symbolType: VN30F1M
                marketType: DERIVATIVE
                loanPackages:
                  - id: 2279
                    name: Gói giao dịch 02
                    initialRate: 0.1848
                    maintenanceRate: 0.1735
                    liquidRate: 0.1731
                    tradingFee:
                      id: 2404
                      name: 2000/HĐ
                      scope: PRODUCT
                      channel: ALL
                      schemaType: FIXED
                      createdDate: '2022-12-13T08:22:12.530837Z'
                      modifiedDate: '2022-12-13T08:22:12.530837Z'
                      fixedTradingFee: 2000
                      fixedDailyCloseTradingFee: 2000
                  - id: 5058
                    name: Test Phái sinh 1212
                    initialRate: 0.1
                    maintenanceRate: 0.03
                    liquidRate: 0.02
                    tradingFee:
                      id: 5057
                      name: 1500/HĐ
                      scope: PRODUCT
                      channel: ALL
                      schemaType: FIXED
                      createdDate: '2023-12-12T03:55:37.22881Z'
                      modifiedDate: '2023-12-12T03:55:37.22881Z'
                      fixedTradingFee: 1500
                      fixedDailyCloseTradingFee: 1500
                  - id: 2278
                    name: Gói giao dịch 01
                    initialRate: 0.2065
                    maintenanceRate: 0.1979
                    liquidRate: 0.1938
                    tradingFee:
                      id: 2436
                      name: Miễn phí
                      scope: PRODUCT
                      channel: ALL
                      schemaType: FIXED
                      createdDate: '2023-02-02T04:22:56.199278Z'
                      modifiedDate: '2023-02-02T04:22:56.199278Z'
                      fixedTradingFee: 2000
                      fixedDailyCloseTradingFee: 2000
                  - id: 9990
                    name: Linhpham test
                    initialRate: 0.2065
                    maintenanceRate: 0.1979
                    liquidRate: 0.1938
                    tradingFee:
                      id: 9989
                      name: fdfhv
                      scope: PRODUCT
                      channel: ALL
                      schemaType: PROGRESSIVE
                      createdDate: '2026-01-16T09:09:15.556640382Z'
                      modifiedDate: '2026-01-16T09:09:15.556640382Z'
                      progressTradingFee:
                        - fromQuantity: 1
                          toQuantity: 2000
                          fee: 1500
                      progressDailyCloseTradingFee:
                        - fromQuantity: 2001
                          toQuantity: 3000
                          fee: 2196
        '400':
          description: Yêu cầu không hợp lệ
          headers:
            Date:
              schema:
                type: string
              example: Wed, 25 Mar 2026 16:03:33 GMT
            Vary:
              schema:
                type: string
              example: Origin
            X-Ratelimit-Limit:
              schema:
                type: integer
              example: 300
            X-Ratelimit-Remaining:
              schema:
                type: integer
              example: 294
            X-Ratelimit-Reset:
              schema:
                type: integer
              example: 1774540931
            X-Tyk-Api-Expires:
              schema:
                type: string
              example: Thu, 02 Jan 3000 15:04:00 UTC
            Transfer-Encoding:
              schema:
                type: string
              example: chunked
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 400
                    description: Mã HTTP
                    format: int32
                  code:
                    type: string
                    example: INVALID_INPUT
                    description: Mã lỗi
                  message:
                    type: string
                    example: marketType is invalid
                    description: Thông điệp lỗi
              example:
                status: 400
                code: INVALID_INPUT
                message: marketType is invalid
        '500':
          description: Lỗi hệ thống
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 500
                    description: Mã HTTP
                    format: int32
                  code:
                    type: string
                    example: OA-009
                    description: Mã lỗi
                  message:
                    type: string
                    example: Lỗi hệ thống
                    description: Thông điệp lỗi
              example:
                code: OA-009
                message: Lỗi hệ thống
                status: 500

````

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