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

# Lịch sử trạng thái lệnh điều kiện

> Lấy lịch sử thay đổi trạng thái của một lệnh điều kiện.



## OpenAPI

````yaml /vi/openapi/ssi.2026-08-21.openapi.yaml get /api/v3/trading/fco/statusHistory
openapi: 3.1.2
info:
  title: SSI FastConnect Open API
  version: 3.0.0
servers:
  - url: https://api.ssi.com.vn
    description: Production
security:
  - SsiBearerAuth: []
tags:
  - name: authentication
    description: Xác thực và quản lý token.
    x-group: Xác thực
  - name: account
    description: Thông tin tài khoản giao dịch.
    x-group: Tài khoản
  - name: market-data
    description: Dữ liệu thị trường.
    x-group: Dữ liệu thị trường
  - name: trading
    description: Giao dịch và quản lý lệnh.
    x-group: Giao dịch
  - name: conditional-orders
    description: Lệnh điều kiện.
    x-group: Lệnh điều kiện
paths:
  /api/v3/trading/fco/statusHistory:
    get:
      tags:
        - conditional-orders
      summary: Lịch sử trạng thái lệnh điều kiện
      description: Lấy lịch sử thay đổi trạng thái của một lệnh điều kiện.
      operationId: getConditionalOrderStatusHistory
      parameters:
        - name: fcoId
          in: query
          description: ID của lệnh điều kiện cần truy vấn lịch sử trạng thái.
          required: true
          schema:
            type: string
          example: ddb68115-5d03-4ee7-8f4e-ae816e138915
        - $ref: '#/components/parameters/ContentType'
        - $ref: '#/components/parameters/UserAgent'
        - $ref: '#/components/parameters/AcceptLanguage'
      responses:
        '200':
          description: Thành công.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FcoStatusHistoryResponse'
              example:
                data:
                  - state: INIT
                    time: 20/08/2026 16:00:22
                    code: 200
                    detail: Success
                  - state: WAIT
                    time: 20/08/2026 16:00:22
                    code: 200
                    detail: state is WAIT
                  - state: WC
                    time: 20/08/2026 16:13:17
                    code: 200
                    detail: Success
                  - state: WC
                    time: 20/08/2026 16:13:19
                    code: 200
                    detail: state is WC
                  - state: TER
                    time: 20/08/2026 16:13:22
                    code: 10001
                    detail: >-
                      Deactivated conditional order as the order has been
                      cancelled by customer
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - SsiBearerAuth: []
components:
  parameters:
    ContentType:
      name: Content-Type
      in: header
      required: true
      description: Định dạng nội dung request body. Chủ yếu là application/json.
      schema:
        type: string
        default: application/json
    UserAgent:
      name: User-Agent
      in: header
      required: false
      description: Thông tin client gửi request.
      schema:
        type: string
    AcceptLanguage:
      name: Accept-Language
      in: header
      required: false
      description: >-
        Ngôn ngữ phản hồi mong muốn. Nếu không có header này, hệ thống sẽ mặc
        định là en
      schema:
        type: string
        default: en
  schemas:
    FcoStatusHistoryResponse:
      type: object
      properties:
        data:
          description: Dữ liệu trả về.
          type: array
          items:
            type: object
            properties:
              state:
                description: Trạng thái của lệnh điều kiện.
                type: string
              time:
                description: Thời điểm ghi nhận.
                type: string
              code:
                description: Mã kết quả hoặc mã xác thực giao dịch.
                type: integer
              detail:
                description: Chi tiết kết quả hoặc lỗi.
                type: string
    ErrorResponse:
      type: object
      properties:
        code:
          description: Mã kết quả hoặc mã xác thực giao dịch.
          type: string
        msg:
          description: Thông báo kết quả xử lý.
          type: string
  responses:
    BadRequest:
      description: Yêu cầu không hợp lệ.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Chưa được xác thực hoặc token không hợp lệ.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Lỗi nội bộ máy chủ.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    SsiBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Access token lấy từ endpoint /api/v3/auth/token hoặc
        /api/v3/auth/refresh.

````

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