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

# List Complex Orders

> List all complex orders with optional filters.

Returns a paginated list of complex orders (conditional, TWAP, etc.) across all
accessible subaccounts, ordered by `created_at` descending.

**Filters:**
All filters are optional and can be combined. Use `complex_order_type` to narrow
to a specific type. If no `subaccount_id` is specified, returns orders from all
subaccounts the user has access to.



## OpenAPI

````yaml /openapi.json get /v1/complex-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/complex-orders:
    get:
      tags:
        - complex-orders
      summary: List Complex Orders
      description: >-
        List all complex orders with optional filters.


        Returns a paginated list of complex orders (conditional, TWAP, etc.)
        across all

        accessible subaccounts, ordered by `created_at` descending.


        **Filters:**

        All filters are optional and can be combined. Use `complex_order_type`
        to narrow

        to a specific type. If no `subaccount_id` is specified, returns orders
        from all

        subaccounts the user has access to.
      operationId: list_complex_orders_v1_complex_orders_get
      parameters:
        - name: complex_order_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Complex Order Type
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                enum:
                  - PENDING
                  - ACTIVE
                  - TRIGGERED
                  - CANCELLED
              - type: 'null'
            title: Status
        - name: centos_id
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Centos Id
        - name: custom_asset_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Custom Asset Id
        - name: subaccount_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Subaccount Id
        - name: parent_centos_order_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Parent Centos Order Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 100
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComplexOrderListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ComplexOrderListResponse:
      properties:
        complex_orders:
          additionalProperties:
            items:
              $ref: '#/components/schemas/ComplexOrderResponse'
            type: array
          type: object
          title: Complex Orders
          description: List of complex orders matching the query
        count:
          type: integer
          title: Count
          description: Total count of matching complex orders (for pagination)
      type: object
      required:
        - complex_orders
        - count
      title: ComplexOrderListResponse
      description: Schema for list of complex orders (all types).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ComplexOrderResponse:
      properties:
        complex_order_id:
          type: string
          format: uuid
          title: Complex Order Id
          description: Unique complex order identifier
        complex_order_type:
          type: string
          title: Complex Order Type
          description: 'Complex order type: CONDITIONAL, TWAP, etc.'
        complex_order_subtype:
          anyOf:
            - type: string
            - type: 'null'
          title: Complex Order Subtype
          description: 'Complex order subtype: TP, SL, STOP, etc.'
        subaccount_id:
          type: string
          format: uuid
          title: Subaccount Id
          description: Subaccount the order belongs to
        centos_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Centos Id
          description: Instrument ID
        custom_asset_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Custom Asset Id
          description: Custom asset basket ID
        status:
          type: string
          title: Status
          description: Order status (interpretation depends on complex_order_type)
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Creation timestamp (UTC)
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Last update timestamp (UTC)
        conditional_order:
          anyOf:
            - $ref: '#/components/schemas/ConditionalOrderResponse'
            - type: 'null'
          description: Conditional order
      type: object
      required:
        - complex_order_id
        - complex_order_type
        - subaccount_id
        - status
        - created_at
        - updated_at
      title: ComplexOrderResponse
      description: >-
        Schema for a complex order response (unified across all complex order
        types).
    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
    ConditionalOrderResponse:
      properties:
        parent_centos_order_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Centos Order Id
          description: Parent order ID that this conditional is attached to (for TP/SL)
        parent_complex_order_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Complex Order Id
          description: >-
            Parent complex order ID that this conditional is attached to (for
            chaining)
        conditional_order_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Conditional Order Type
          description: 'Type of conditional order: TP (take profit), SL (stop loss), or STOP'
        stop_order_price:
          anyOf:
            - type: number
            - type: 'null'
          title: Stop Order Price
          description: >-
            Activation price for STOP conditional orders. The price at which the
            conditional triggers and places the trigger order.
        trigger_stop_order_price:
          anyOf:
            - type: number
            - type: 'null'
          title: Trigger Stop Order Price
          description: Stop/reverse-stop price for the triggered order (SL or TP MARKET)
        trigger_order_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Trigger Order Type
          description: 'Order type of the triggered order: LIMIT or MARKET'
        trigger_order_qty:
          anyOf:
            - type: number
            - type: 'null'
          title: Trigger Order Qty
          description: Quantity of the triggered order
        trigger_order_limit_price:
          anyOf:
            - type: number
            - type: 'null'
          title: Trigger Order Limit Price
          description: Limit price of the triggered order (if LIMIT)
        trigger_order_buy_flag:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Trigger Order Buy Flag
          description: 'Direction of the triggered order: true=buy, false=sell'
        trigger_centos_order_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Trigger Centos Order Id
          description: Centos order ID of the triggered order (set once activated)
        trigger_complex_order_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Trigger Complex Order Id
          description: Complex order ID of the triggered order (set once activated)
      type: object
      title: ConditionalOrderResponse
      description: >-
        Response for a conditional order. Contains both the condition definition
        and the trigger order

        that gets placed when the condition is met.


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

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

````