> ## 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 khoản vay

> Lấy danh sách khoản vay của tài khoản margin.



## OpenAPI

````yaml /vi/openapi/tcbs.v1.openapi.yaml get /khaos/v1/loan/{accountNo}
openapi: 3.0.3
info:
  title: TCBS iFlash Open API
  description: REST APIs for trading stocks and derivatives on TCBS.
  version: 1.0.0
  contact:
    email: openapi@tcbs.com.vn
servers:
  - url: https://openapi.tcbs.com.vn
    description: Production
security:
  - bearerAuth: []
tags:
  - name: authentication
    description: Xác thực và cấp token truy cập.
    x-group: Xác thực
  - name: account
    description: Thông tin tài khoản, tài sản và hạn mức.
    x-group: Tài khoản
  - name: market-data
    description: Dữ liệu chứng khoán và phái sinh.
    x-group: Dữ liệu thị trường
  - name: cash
    description: Giao dịch và thông tin tiền.
    x-group: Tiền
  - name: stock-orders
    description: Đặt, sửa, hủy và tra cứu lệnh cổ phiếu.
    x-group: Lệnh cổ phiếu
  - name: derivative-orders
    description: Đặt, sửa, hủy và tra cứu lệnh phái sinh.
    x-group: Lệnh phái sinh
paths:
  /khaos/v1/loan/{accountNo}:
    get:
      tags:
        - account
      summary: Danh sách khoản vay
      description: Lấy danh sách khoản vay của tài khoản margin.
      operationId: getKhaosLoanAccountNo
      parameters:
        - name: accountNo
          in: path
          required: true
          description: Số tiểu khoản margin.
          schema:
            type: string
      responses:
        '200':
          description: Phản hồi thành công
          content:
            application/json:
              schema:
                type: object
                properties:
                  size:
                    type: number
                    format: double
                    description: Số bản ghi.
                  content:
                    type: array
                    items:
                      type: object
                      properties:
                        openingDate:
                          type: string
                          description: Ngày mở khoản vay.
                        dueDate:
                          type: string
                          description: Ngày đáo hạn.
                        renewTime:
                          type: number
                          format: double
                          description: Số lần đã gia hạn nợ.
                        maxRenewTime:
                          type: number
                          format: double
                          description: Giới hạn số lần gia hạn.
                        isRenewable:
                          type: boolean
                          description: 'Có được gia hạn: true/false.'
                        reasonList:
                          type: array
                          items:
                            type: string
                          description: Lý do không được gia hạn.
                        insurance:
                          type: object
                          properties:
                            insuranceName:
                              type: string
                              description: Tên gói marginsure.
                            insuranceCode:
                              type: string
                              description: Mã gói marginsure.
                            insuranceFee:
                              type: number
                              format: double
                              description: Phí marginsure.
              example:
                size: 10
                content:
                  - openingDate: '2024-09-06'
                    dueDate: '2024-12-04'
                    renewTime: 0
                    maxRenewTime: 1
                    isRenewable: false
                    reasonList:
                      - Chưa đến ngày xin gia hạn
                    insurance:
                      insuranceName: Phòng ngự
                      insuranceCode: MRX_INSURANCE_PREMIUM_1
                      insuranceFee: 0.15
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Không xác thực — thiếu, sai hoặc không hợp lệ Bearer token.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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