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

# Hạn mức margin

> Lấy thông tin hạn mức margin của khách hàng theo số tài khoản lưu ký.



## OpenAPI

````yaml /vi/openapi/tcbs.v1.openapi.yaml get /aion/v1/customers/{custodyId}/accounts
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:
  /aion/v1/customers/{custodyId}/accounts:
    get:
      tags:
        - account
      summary: Hạn mức margin
      description: Lấy thông tin hạn mức margin của khách hàng theo số tài khoản lưu ký.
      operationId: getAionCustomersCustodyIdAccounts
      parameters:
        - name: custodyId
          in: path
          required: true
          description: Mã tài khoản lưu ký.
          schema:
            type: string
      responses:
        '200':
          description: Phản hồi thành công
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    custodyID:
                      type: string
                      description: Số tài khoản lưu ký.
                    accountNo:
                      type: string
                      description: Số tiểu khoản.
                    aftype:
                      type: string
                      description: Loại hình hợp đồng.
                    vsdStatus:
                      type: string
                      description: Trạng thái VSD.
                    accountStatus:
                      type: string
                      description: >-
                        Trạng thái: A = Được phép đặt lệnh, P = Không được phép,
                        C = Đã đóng, B = Phong tỏa, N = Chờ đóng, R = Từ chối, T
                        = Chờ cập nhật.
                    marginLimit:
                      type: number
                      format: double
                      description: Hạn mức margin của tiểu khoản.
                    accountType:
                      type: string
                      description: >-
                        Loại tiểu khoản: normal, margin, copier, trader, CHILD,
                        CW, SPW, SPT.
                    isIA:
                      type: string
                      description: 'Có kết nối IA: Y = Có, N = Không.'
                    bankName:
                      type: string
                      description: Tên ngân hàng kết nối IA.
                    bankAccount:
                      type: string
                      description: Số tài khoản kết nối IA.
              example:
                - custodyID: 105C738764
                  accountNo: '0001000075'
                  aftype: '0075'
                  vsdStatus: 'Y'
                  accountStatus: A
                  marginLimit: 0
                  isIA: 'Y'
                  bankName: TCB
                  bankAccount: '11520154590019'
                  accountType: normal
        '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.