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

# Margin quota

> Get margin quota information for a customer.



## OpenAPI

````yaml /en/openapi/tcbs-v1.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: []
paths:
  /aion/v1/customers/{custodyId}/accounts:
    get:
      summary: Margin quota
      description: Get margin quota information for a customer.
      parameters:
        - name: custodyId
          in: path
          required: true
          description: Custody code.
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  '[].custodyID':
                    type: string
                    description: Custody ID.
                  '[].accountNo':
                    type: string
                    description: Account number.
                  '[].aftype':
                    type: string
                    description: Contract type.
                  '[].vsdStatus':
                    type: string
                    description: VSD status.
                  '[].accountStatus':
                    allOf:
                      - $ref: '#/components/schemas/SubAccountStatus'
                    description: >-
                      Status: A = Active, P = Pending, C = Closed, B = Blocked,
                      N = Pending close, R = Rejected, T = Pending update.
                  '[].marginLimit':
                    type: number
                    format: double
                    description: Margin limit of the sub-account.
                  '[].accountType':
                    allOf:
                      - $ref: '#/components/schemas/SubAccountType'
                    description: >-
                      Account type: normal, margin, copier, trader, CHILD, CW,
                      SPW, SPT.
                  '[].isIA':
                    allOf:
                      - $ref: '#/components/schemas/IAConnection'
                    description: 'IA connection: Y = Yes, N = No.'
                  '[].bankName':
                    type: string
                    description: IA-connected bank name.
                  '[].bankAccount':
                    type: string
                    description: IA-connected bank account.
components:
  schemas:
    SubAccountStatus:
      type: string
      description: >-
        Trạng thái tiểu khoản: 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.
      enum:
        - A
        - P
        - C
        - B
        - 'N'
        - R
        - T
    SubAccountType:
      type: string
      description: >-
        Loại tiểu khoản: normal, margin, copier, trader, CHILD, CW, SPW hoặc
        SPT.
      enum:
        - normal
        - margin
        - copier
        - trader
        - CHILD
        - CW
        - SPW
        - SPT
    IAConnection:
      type: string
      description: 'Trạng thái kết nối IA: Y = có, N = không.'
      enum:
        - 'Y'
        - 'N'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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