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



## OpenAPI

````yaml /vi/openapi/dnse.2026-09-10.openapi.yaml get /accounts/{accountNo}/loan-packages
openapi: 3.0.0
info:
  title: DNSE OpenAPI (2026-09-10)
  version: 2.0.0
  description: DNSE OpenAPI spec
servers:
  - url: https://openapi.dnse.com.vn
    description: Production
  - url: https://sb-openapi.dnse.com.vn
    description: Sanbox
security: []
tags:
  - name: trading
    description: Xác thực và các hoạt động đặt lệnh.
    x-group: Giao dịch
  - name: account
    description: Tài khoản, số dư, khoản vay, lệnh và vị thế.
    x-group: Tài khoản
  - name: market
    description: Thông tin mã chứng khoán, báo giá, OHLC và giao dịch.
    x-group: Dữ liệu thị trường
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
      operationId: account_getLoanPackages
      parameters:
        - $ref: '#/components/parameters/XApiKey'
        - $ref: '#/components/parameters/XAuxDate'
        - $ref: '#/components/parameters/XSignature'
        - 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
            - BOND: Gói vay giao dịch trái phiếu
          deprecated: false
          schema:
            $ref: '#/components/schemas/MarketType'
          example: DERIVATIVE
        - name: symbol
          in: query
          required: true
          description: Mã chứng khoán
          deprecated: false
          schema:
            type: string
          example: 41I1G4000
      responses:
        '200':
          description: OK
          headers:
            Date:
              $ref: '#/components/headers/Date'
            Vary:
              $ref: '#/components/headers/Vary'
            X-Ratelimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-Ratelimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-Ratelimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
            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:
                $ref: '#/components/schemas/LoanPackagesResponse'
              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':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    XApiKey:
      name: X-Api-Key
      in: header
      required: true
      description: >-
        API key được cấp khi đăng ký dịch vụ DNSE OpenAPI.

        Ví dụ:
        `b3JnOmRuc2UgaWQ6MjdlZTc1MzcxZGFkNTY0NmYzYTM2NDk1ZGE3OGNiOGQgaDptdXJtdXIxMjg=`
      schema:
        type: string
    XAuxDate:
      name: X-Aux-Date
      in: header
      required: true
      description: |-
        Thời gian thực hiện request, dùng trong cơ chế ký request của DNSE.
        Ví dụ: `Sat, 01 May 2026 14:24:23 +0000`
      schema:
        type: string
    XSignature:
      name: X-Signature
      in: header
      required: true
      description: >-
        Chữ ký xác thực request được tạo từ API key secret và X-Aux-Date.

        Ví dụ: `Signature
        keyId="b3JnOmRuc2UgaWQ6MjdlZTc1MzcxZGFkNTY0NmYzYTM2NDk1ZGE3OGNiOGQgaDptdXJtdXIxMjg=",algorithm="hmac-sha256",headers="(request-target)
        x-aux-date",signature="rfbVXHDUi%2B%2FsOkLXle7O17Qm%2F05cbISSR%2BDcFrBHfqQ%3D",nonce="4add8c3264e4492b9f8ecde0cf26b523"`
      schema:
        type: string
  schemas:
    MarketType:
      type: string
      description: |-
        Loại thị trường.

        - `STOCK`: Giao dịch cơ sở
        - `DERIVATIVE`: Giao dịch phái sinh
        - `BOND`: Giao dịch trái phiếu
      enum:
        - STOCK
        - DERIVATIVE
        - BOND
      x-enum-descriptions:
        - Giao dịch cơ sở
        - Giao dịch phái sinh
        - Giao dịch trái phiếu
      x-enum-varnames:
        - STOCK
        - DERIVATIVE
        - BOND
      example: STOCK
    LoanPackagesResponse:
      type: object
      properties:
        symbolType:
          allOf:
            - $ref: '#/components/schemas/SymbolType'
          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:
          allOf:
            - $ref: '#/components/schemas/MarketType'
          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
            - BOND: Gói vay giao dịch trái phiếu
        loanPackages:
          type: array
          description: Danh sách gói vay
          items:
            $ref: '#/components/schemas/LoanPackage'
          example:
            - id: 1775
              name: GD Tiền mặt
              initialRate: 1
              interestRate: 0.125
              liquidRate: 0.3
              maintenanceRate: 0.4
              type: M
              brokerFirmBuyingFeeRate: 0
              brokerFirmSellingFeeRate: 0
        symbol:
          type: string
          example: ACB
          description: Mã chứng khoán
    SymbolType:
      type: string
      description: |-
        Phân loại mã hợp đồng phái sinh theo thời gian đáo hạn.

        - ``: Không áp dụng cho mã không phải hợp đồng phái sinh
        - `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ý
      enum:
        - ''
        - VN30F1M
        - VN30F2M
        - VN30F1Q
        - VN30F2Q
      x-enum-descriptions:
        - Không áp dụng
        - HĐTL chỉ số VN30 1 tháng
        - HĐTL chỉ số VN30 2 tháng
        - HĐTL chỉ số VN30 1 quý
        - HĐTL chỉ số VN30 2 quý
      x-enum-varnames:
        - UNSPECIFIED
        - VN30F1M
        - VN30F2M
        - VN30F1Q
        - VN30F2Q
      example: VN30F1M
    LoanPackage:
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 2279
          description: Id gói vay
        name:
          type: string
          example: Gói giao dịch 02
          description: Tên gói vay
        initialRate:
          type: number
          format: double
          example: 0.1848
          description: Tỷ lệ ban đầu
        maintenanceRate:
          type: number
          format: double
          example: 0.1735
          description: Tỷ lệ duy trì (call margin)
        liquidRate:
          type: number
          format: double
          example: 0.1731
          description: Tỷ lệ xử lý (force sell)
        tradingFee:
          $ref: '#/components/schemas/TradingFee'
        interestRate:
          type: number
          format: float
          example: 0.125
          description: Tỷ lệ lãi vay
        type:
          type: string
          example: M
          description: Loại gói vay
        brokerFirmBuyingFeeRate:
          type: number
          format: double
          example: 0
          description: Phí giao dịch chiều mua công ty chứng khoán thu
        brokerFirmSellingFeeRate:
          type: number
          format: double
          example: 0
          description: Phí giao dịch chiều bán công ty chứng khoán thu
    ErrorBody:
      type: object
      required:
        - status
        - code
        - message
      properties:
        status:
          type: integer
          format: int32
          description: Mã HTTP.
          example: 400
        code:
          type: string
          description: Mã lỗi DNSE.
          example: OA-003
        message:
          type: string
          description: Thông điệp lỗi.
          example: Thông tin nhập không hợp lệ
    TradingFee:
      type: object
      description: Thông tin biểu phí phái sinh (áp dụng cho DERIVATIVE)
      properties:
        id:
          type: integer
          format: int32
          example: 2404
          description: Id chính sách phí phái sinh
        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:
          allOf:
            - $ref: '#/components/schemas/TradingFeeSchemaType'
          example: FIXED
          description: |-
            Loại biểu phí
            FIXED: Phí cố định
            PROGRESSIVE: Phí lũy tiến
        createdDate:
          type: string
          format: date-time
          example: '2022-12-13T08:22:12.530837Z'
          description: Thời điểm áp dụng
        modifiedDate:
          type: string
          format: date-time
          example: '2022-12-13T08:22:12.530837Z'
          description: Thời điểm cập nhật
        fixedTradingFee:
          type: integer
          format: int32
          example: 2000
          description: Phí cố định trên 1 hợp đồng
        fixedDailyCloseTradingFee:
          type: integer
          format: int32
          example: 2000
          description: Phí đóng vị thế trong ngày
        progressTradingFee:
          type: array
          description: Phí giao dịch lũy tiến
          items:
            $ref: '#/components/schemas/ProgressiveTradingFee'
        progressDailyCloseTradingFee:
          type: array
          description: Phí đóng vị thế trong ngày lũy tiến
          items:
            $ref: '#/components/schemas/ProgressiveDailyCloseTradingFee'
    TradingFeeSchemaType:
      type: string
      description: |-
        Loại biểu phí.

        - `FIXED`: Phí cố định
        - `PROGRESSIVE`: Phí lũy tiến
      enum:
        - FIXED
        - PROGRESSIVE
      x-enum-descriptions:
        - Phí cố định
        - Phí lũy tiến
      x-enum-varnames:
        - FIXED
        - PROGRESSIVE
      example: FIXED
    ProgressiveTradingFee:
      type: object
      properties:
        fromQuantity:
          type: number
          format: double
          example: 1
          description: Khối lượng bắt đầu
        toQuantity:
          type: number
          format: double
          example: 2000
          description: Khối lượng kết thúc
        fee:
          type: number
          format: double
          example: 1500
          description: Mức phí
    ProgressiveDailyCloseTradingFee:
      type: object
      properties:
        fromQuantity:
          type: number
          format: double
          example: 2001
          description: Khối lượng bắt đầu
        toQuantity:
          type: number
          format: double
          example: 3000
          description: Khối lượng kết thúc
        fee:
          type: number
          format: double
          example: 2196
          description: Mức phí
  headers:
    Date:
      description: Response date from the DNSE gateway.
      schema:
        type: string
      example: Wed, 18 Mar 2026 16:17:35 GMT
    Vary:
      description: >-
        Response header indicating the request headers used for content
        negotiation.
      schema:
        type: string
      example: Origin
    XRateLimitLimit:
      description: Maximum number of requests allowed in the current rate-limit window.
      schema:
        type: integer
      example: 300
    XRateLimitRemaining:
      description: Number of requests remaining in the current rate-limit window.
      schema:
        type: integer
      example: 299
    XRateLimitReset:
      description: Unix timestamp at which the current rate-limit window resets.
      schema:
        type: integer
      example: 1773850655
    ContentLength:
      description: Response body size in bytes.
      schema:
        type: integer
      example: 430
    XRequestId:
      description: Unique identifier assigned to the request by the DNSE gateway.
      schema:
        type: string
      example: unknown
  responses:
    BadRequest:
      description: Yêu cầu không hợp lệ.
      headers:
        Content-Length:
          $ref: '#/components/headers/ContentLength'
        Date:
          $ref: '#/components/headers/Date'
        Vary:
          $ref: '#/components/headers/Vary'
        X-Ratelimit-Limit:
          $ref: '#/components/headers/XRateLimitLimit'
        X-Ratelimit-Remaining:
          $ref: '#/components/headers/XRateLimitRemaining'
        X-Ratelimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        X-Tyk-Api-Expires:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            status: 400
            code: OA-003
            message: Thông tin nhập không hợp lệ
    InternalError:
      description: Lỗi hệ thống.
      headers:
        Content-Length:
          $ref: '#/components/headers/ContentLength'
        Date:
          $ref: '#/components/headers/Date'
        Vary:
          $ref: '#/components/headers/Vary'
        X-Ratelimit-Limit:
          $ref: '#/components/headers/XRateLimitLimit'
        X-Ratelimit-Remaining:
          $ref: '#/components/headers/XRateLimitRemaining'
        X-Ratelimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        X-Tyk-Api-Expires:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            status: 500
            code: OA-009
            message: Lỗi hệ thống

````

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