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

# Đặt lệnh điều kiện phái sinh

> Đặt lệnh điều kiện trên thị trường phái sinh.



## OpenAPI

````yaml /vi/openapi/tcbs.v1.openapi.yaml post /khronos/v1/order/condition/place
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:
  /khronos/v1/order/condition/place:
    post:
      tags:
        - derivative-orders
      summary: Đặt lệnh điều kiện phái sinh
      description: Đặt lệnh điều kiện trên thị trường phái sinh.
      operationId: postKhronosOrderConditionPlace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                accountId:
                  type: string
                  description: Mã tài khoản lưu ký.
                subAccountId:
                  type: string
                  description: Số tiểu khoản phái sinh.
                side:
                  allOf:
                    - $ref: '#/components/schemas/DerivativeSide'
                  description: B = Mua, S = Bán.
                symbol:
                  type: string
                  description: Mã phái sinh, ví dụ VN30F2101.
                price:
                  type: number
                  format: double
                  description: Giá đặt lệnh.
                volume:
                  type: number
                  format: double
                  description: Số lượng, lớn hơn 0.
                orderType:
                  allOf:
                    - $ref: '#/components/schemas/DerivativeConditionalOrderType'
                  description: >-
                    SOL = giá TT >= soPrice, SOU = giá TT <= soPrice, TSO =
                    Trailing Stop.
                soPrice:
                  type: number
                  format: double
                  description: Giá kích hoạt.
                callbackPoint:
                  type: number
                  format: double
                  description: Biên trượt (chỉ dùng khi orderType = TSO).
                activationPrice:
                  type: number
                  format: double
                  description: Giá kích hoạt (chỉ dùng khi orderType = TSO).
                refId:
                  type: string
                  description: Số chống trùng theo từng lệnh.
              required:
                - accountId
                - subAccountId
                - side
                - symbol
                - price
                - volume
                - orderType
                - soPrice
                - callbackPoint
                - activationPrice
      responses:
        '200':
          description: Phản hồi thành công
          content:
            application/json:
              schema:
                type: object
                properties:
                  cmd:
                    type: string
                    description: Lệnh gọi (echo).
                  rc:
                    type: string
                    description: Mã kết quả, 1 = thành công.
                  data:
                    type: array
                    description: Danh sách kết quả đặt lệnh.
                    items:
                      type: object
                      properties:
                        symbol:
                          type: string
                        status:
                          type: string
                        msg_type:
                          type: string
                        showPrice:
                          type: string
                        orderTime:
                          type: string
                        accountCode:
                          type: string
                        orderNo:
                          type: integer
                          format: int64
                        matchVolume:
                          type: number
                          format: double
                        side:
                          type: string
                        volume:
                          type: string
                        pk_orderNo:
                          type: string
                        channel:
                          type: string
                        group:
                          type: string
                        quote:
                          type: string
              example:
                cmd: Web.newOrder
                rc: '1'
                data:
                  - symbol: VN30F2110
                    status: P
                    msg_type: 1I
                    showPrice: '1504.4'
                    orderTime: '20:16:57'
                    accountCode: 100159A
                    orderNo: 1
                    matchVolume: 0
                    side: B
                    volume: '1'
                    pk_orderNo: '7843961'
                    channel: D
                    group: FU
                    quote: G
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    DerivativeSide:
      type: string
      description: 'Chiều lệnh phái sinh: B = mua, S = bán.'
      enum:
        - B
        - S
    DerivativeConditionalOrderType:
      type: string
      description: SOL = giá TT >= soPrice, SOU = giá TT <= soPrice, TSO = Trailing Stop.
      enum:
        - SOL
        - SOU
        - TSO
  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.