> ## 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 mới



## OpenAPI

````yaml /vi/openapi/fireant-v1.yaml post /mxv/orders
openapi: 3.1.0
info:
  version: v1
  title: FireAnt RESTFUL API
  description: Tài liệu đặc tả FireAnt RESTFUL API v1.0.0
servers:
  - url: https://api.fireant.vn
security: []
paths:
  /mxv/orders:
    post:
      tags:
        - MXV
      summary: Đặt lệnh mới
      operationId: MXV_PlaceOrder
      parameters:
        - name: accountType
          in: query
          description: ' (0 = FUTURE, 1 = NANO, 2 = MXV)'
          required: false
          schema:
            enum:
              - 0
              - 1
              - 2
            type: integer
            format: int32
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FireAnt.Api.Models.MXV.MXVNewOrderRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/FireAnt.Api.Models.MXV.MXVNewOrderRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FireAnt.Api.Models.MXV.MXVOrderResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/FireAnt.Api.Models.MXV.MXVOrderResponse'
      security:
        - oauth2:
            - user-data-write
components:
  schemas:
    FireAnt.Api.Models.MXV.MXVNewOrderRequest:
      description: Request model for placing new order
      required:
        - symbol
        - side
        - quantity
      type: object
      properties:
        symbol:
          description: 'Mã hợp đồng (VD: CP2COH25)'
          type: string
        side:
          description: 'Phía giao dịch: 1 = Mua, 2 = Bán'
          pattern: ^[12]$
          type: string
        quantity:
          format: int32
          description: Số lượng lệnh (phải > 0)
          maximum: 2147483647
          minimum: 1
          type: integer
        orderType:
          description: >-
            Loại lệnh: 1 = Thị trường, 2 = Giới hạn, 3 = Dừng, 4 = Dừng-Giới
            hạn. Mặc định: 2
          pattern: ^[1234]$
          type: string
        timeInForce:
          description: >-
            Thời gian hiệu lực của lệnh đặt: 0 = Trong ngày, 1 = GTC (Cho đến
            khi hủy), 6 = GTD (Cho đến ngày). Mặc định: 0
          pattern: ^[016]$
          type: string
        price:
          format: double
          description: Giá (bắt buộc cho lệnh GIỚI HẠN và DỪNG-GIỚI HẠN)
          type: number
        stopPrice:
          format: double
          description: Giá dừng (bắt buộc cho lệnh DỪNG và DỪNG-GIỚI HẠN)
          type: number
        expireDate:
          description: Ngày hết hạn theo định dạng YYYYMMDD (bắt buộc cho lệnh GTD)
          type: string
    FireAnt.Api.Models.MXV.MXVOrderResponse:
      description: Response model for order operations (place, cancel, replace)
      type: object
      properties:
        success:
          description: Indicates if the operation was successful
          type: boolean
        cl_ord_id:
          description: 'ClOrdID (Client Order ID: ID tạo bởi TVKD)'
          type: string
        order_id:
          description: OrderID (ID tạo bởi sàn)
          type: string
        message:
          description: Success message
          type: string
        error:
          description: Error message (if any)
          type: string
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        implicit:
          scopes:
            accounts-read: Đọc danh sách tài khoản giao dịch chứng khoán
            accounts-write: Liên kết tài khoản chứng khoán
            orders-read: Đọc danh sách lệnh giao dịch chứng khoán
            orders-write: Đặt, sửa, hủy lệnh giao dịch chứng khoán
            companies-read: Đọc thông tin doanh nghiệp
            companies-write: Tạo mới, cập nhật, xóa thông tin doanh nghiệp
            individuals-read: Đọc thông tin cá nhân
            individuals-write: Tạo mới, cập nhật, xóa thông tin cá nhân
            finance-read: Đọc thông tin tài chính
            finance-write: Tạo mới, cập nhật, xóa thông tin tài chính
            posts-write: Đăng bài viết
            posts-read: Lấy nội dung các bài viết của cộng đồng
            symbols-read: Đọc thông tin mã chứng khoán
            symbols-write: Tạo mới, cập nhật, xóa mã chứng khoán
            users-read: Đọc dữ liệu công khai của người dùng
            user-data-read: Đọc tất cả dữ liệu của người dùng hiện tại
            user-data-write: Cập nhật tất cả dữ liệu của người dùng hiện tại
            search: Tìm kiếm
            academy-read: Đọc dữ liệu các khóa học
            academy-write: Đăng ký khóa học
            blog-read: Đọc dữ liệu blog
            investopedia-read: Đọc dữ liệu thuật ngữ
            commodities-read: Đọc dữ liệu hàng hóa phái sinh
            all_claims: All
            roles: Role
          authorizationUrl: https://accounts.fireant.vn/connect/authorize
      description: OAuth2 Implicit Grant

````

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