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

# Open positions (derivative)

> Query open derivative positions.



## OpenAPI

````yaml /en/openapi/tcbs-v1.yaml get /khronos/v1/account/portfolio/status
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:
  /khronos/v1/account/portfolio/status:
    get:
      summary: Open positions (derivative)
      description: Query open derivative positions.
      parameters:
        - name: accountId
          in: query
          required: true
          description: Custody account number.
          schema:
            type: string
        - name: subAccountId
          in: query
          required: true
          description: Derivative sub-account.
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  cmd:
                    type: string
                    description: Response command name.
                  rc:
                    type: string
                    description: Result code, 1 = success.
                  data:
                    type: array
                    items:
                      type: object
                    description: List of open positions.
                  data[].symbol:
                    type: string
                    description: Contract code.
                  data[].im:
                    type: string
                    description: Margin ratio.
                  data[].deliver:
                    type: integer
                    format: int64
                    description: Number of SHORT.
                  data[].receive:
                    type: integer
                    format: int64
                    description: Number of LONG.
                  data[].net:
                    type: integer
                    format: int64
                    description: Open position (>0 = LONG, <0 = SHORT).
                  data[].side:
                    type: string
                    description: L = Long, S = Short.
                  data[].lastPrice:
                    type: number
                    format: double
                    description: Market price.
                  data[].imValue:
                    type: number
                    format: double
                    description: Initial margin value.
                  data[].vmValue:
                    type: number
                    format: double
                    description: Profit/loss.
                  data[].mrValue:
                    type: number
                    format: double
                    description: Required margin value.
                  data[].duedate:
                    type: string
                    description: Due date.
                  data[].pc_remain:
                    type: string
                    description: Open position P&L %.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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