> ## Documentation Index
> Fetch the complete documentation index at: https://docs.centosfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Order

> Place a new order.

Submits an order for asynchronous processing. The order is persisted immediately
and queued for execution on the target exchange.

See  [Orders](https://docs.centosfi.com/concepts/orders) and [Order Types](https://docs.centosfi.com/concepts/order-types) for more information.

**Asset Selection:**
Provide exactly one of `centos_id` (standard instrument) or `custom_asset_id` (user-defined basket).
Custom asset orders only support `MARKET` order type — the system automatically routes
IOC limit orders to each underlying instrument at optimal prices.

**Response:**
Returns `202 Accepted` with the order_id and associated complex_orders ids (TP/SL).
Poll `GET /v1/orders/{order_id}` or use webhooks to track execution.



## OpenAPI

````yaml /openapi.json post /v1/orders
openapi: 3.1.0
info:
  title: Centos Finance API
  contact:
    name: Centos Finance
    url: https://centosfi.com/
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.centosfi.com
security: []
tags:
  - name: markets
    description: Search and discover prediction markets across Kalshi and Polymarket.
  - name: subaccounts
    description: >-
      Manage trading subaccounts. Each subaccount can have its own exchange
      credentials and positions.
  - name: positions
    description: View current portfolio positions across all connected exchanges.
  - name: fills
    description: Retrieve trade execution history and fill details.
  - name: prices
    description: Get historical price data and candlesticks from exchanges.
  - name: orders
    description: Place and manage orders on prediction market exchanges.
  - name: complex-orders
    description: >-
      Manage complex orders: conditional orders (take-profit and stop-loss),
      TWAP, and other advanced order types.
paths:
  /v1/orders:
    post:
      tags:
        - orders
      summary: Create Order
      description: >-
        Place a new order.


        Submits an order for asynchronous processing. The order is persisted
        immediately

        and queued for execution on the target exchange.


        See  [Orders](https://docs.centosfi.com/concepts/orders) and [Order
        Types](https://docs.centosfi.com/concepts/order-types) for more
        information.


        **Asset Selection:**

        Provide exactly one of `centos_id` (standard instrument) or
        `custom_asset_id` (user-defined basket).

        Custom asset orders only support `MARKET` order type — the system
        automatically routes

        IOC limit orders to each underlying instrument at optimal prices.


        **Response:**

        Returns `202 Accepted` with the order_id and associated complex_orders
        ids (TP/SL).

        Poll `GET /v1/orders/{order_id}` or use webhooks to track execution.
      operationId: create_order_v1_orders_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderCreate'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OrderCreate:
      properties:
        order_type:
          type: string
          enum:
            - LIMIT
            - MARKET
          description: 'Order type: ''LIMIT'' or ''MARKET'''
        time_in_force:
          type: string
          enum:
            - FOK
            - GTC
            - GTD
            - IOC
          description: 'Time in force: ''FOK'', ''GTC'', ''GTD'', or ''IOC'''
        qty:
          type: number
          exclusiveMinimum: 0
          title: Qty
          description: Order quantity (number of contracts)
        price:
          anyOf:
            - type: number
              exclusiveMaximum: 1
              exclusiveMinimum: 0
            - type: 'null'
          title: Price
          description: Limit price between 0 and 1. Required for LIMIT orders.
        buy_flag:
          type: boolean
          title: Buy Flag
          description: 'Order direction: true=buy, false=sell'
        centos_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Centos Id
          description: Instrument ID. Mutually exclusive with custom_asset_id.
        custom_asset_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Custom Asset Id
          description: Custom asset basket UUID. Mutually exclusive with centos_id.
        subaccount_id:
          type: string
          format: uuid
          title: Subaccount Id
          description: Subaccount to place the order under
        expiry_ts_utc:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expiry Ts Utc
          description: >-
            Expiry timestamp in UTC(ISO 8601). Required for GTD orders. i.e
            '2023-11-07T05:31:56Z'
        conditional_orders_params:
          anyOf:
            - items:
                $ref: '#/components/schemas/ConditionalOrderCreate'
              type: array
            - type: 'null'
          title: Conditional Orders Params
          description: Optional list of conditional orders (TP/SL) to attach to this order.
      type: object
      required:
        - order_type
        - time_in_force
        - qty
        - buy_flag
        - subaccount_id
      title: OrderCreate
      description: Schema for creating a new order.
    OrderCreateResponse:
      properties:
        centos_order_id:
          type: string
          format: uuid
          title: Centos Order Id
          description: Unique order identifier
        complex_orders:
          additionalProperties:
            items:
              type: string
              format: uuid
            type: array
          type: object
          title: Complex Orders
          description: List of complex centos orders id
      type: object
      required:
        - centos_order_id
        - complex_orders
      title: OrderCreateResponse
      description: Schema for order create response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ConditionalOrderCreate:
      properties:
        conditional_order_type:
          type: string
          enum:
            - TP
            - SL
            - STOP
            - REVERSE_STOP
          description: 'Type of conditional order: TP (take profit), SL (stop loss), or STOP'
        stop_order_price:
          anyOf:
            - type: number
              exclusiveMaximum: 1
              exclusiveMinimum: 0
            - type: 'null'
          title: Stop Order Price
          description: >-
            Activation price for STOP conditional orders. This is the price at
            which the conditional order triggers and places the trigger_order.
        trigger_order:
          $ref: '#/components/schemas/TriggerOrder'
          description: >-
            The order that gets placed when the conditional order activates. For
            TP/SL this happens after the parent order fills; for STOP this
            happens when stop_order_price is reached.
        parent_centos_order_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Centos Order Id
          description: Parent order ID (required for TP and SL)
        parent_complex_order_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Complex Order Id
          description: Parent complex order ID (for chaining)
      type: object
      required:
        - conditional_order_type
        - trigger_order
      title: ConditionalOrderCreate
      description: >-
        Schema for a conditional order (take profit or stop loss) attached to a
        parent order.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TriggerOrder:
      properties:
        order_type:
          type: string
          enum:
            - LIMIT
            - MARKET
          description: 'Order type for the triggered order: ''LIMIT'' or ''MARKET'''
        qty:
          type: number
          exclusiveMinimum: 0
          title: Qty
          description: Quantity (number of contracts) for the triggered order
        price:
          anyOf:
            - type: number
              exclusiveMaximum: 1
              exclusiveMinimum: 0
            - type: 'null'
          title: Price
          description: >-
            Limit price for the triggered order (between 0 and 1). Required when
            order_type is LIMIT.
        buy_flag:
          type: boolean
          title: Buy Flag
          description: 'Direction of the triggered order: true=buy, false=sell'
        stop_order_price:
          anyOf:
            - type: number
              exclusiveMaximum: 1
              exclusiveMinimum: 0
            - type: 'null'
          title: Stop Order Price
          description: >-
            Price at which the triggered order activates as a stop or reverse
            stop. Required for SL (stop trigger) and TP MARKET (reverse stop
            trigger). For SL: triggers when price moves against you. For TP
            MARKET: triggers when price moves in your favor.
      type: object
      required:
        - order_type
        - qty
        - buy_flag
      title: TriggerOrder
      description: >-
        The order that will be sent to the exchange when the conditional order's
        condition is met.


        For TP/SL: the parent order fills → the conditional activates → this
        trigger order is placed.

        For STOP/REVERSE_STOP: the stop_order_price is reached → this trigger
        order is placed.

````