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

# Get apiv1ordersconditional

> Get a single conditional (TP/SL) order by its UUID.



## OpenAPI

````yaml /proto-openapi/api/openapi.yaml get /api/v1/orders/conditional/{conditionalOrderId}
openapi: 3.0.3
info:
  title: Monaco Protocol API
  description: REST API for the Monaco Protocol hybrid CLOB exchange.
  version: 1.0.0
servers:
  - url: https://staging.apimonaco.xyz
    description: Staging server (Testnet)
security: []
tags:
  - name: AccountsService
  - name: ApplicationsService
  - name: AuthService
  - name: BuildercodeRewardsService
  - name: CopyTradingService
  - name: DelegatedAgentsService
  - name: FaucetService
  - name: FeesService
  - name: HealthService
  - name: ManagedMarketsService
    description: |-
      Wallet-authenticated maker assignments. The signed session must match both
       configured maker user and application. Owner IDs are process fences, never auth.
       Only wallet sessions are supported; delegated-agent sessions receive 403.
  - name: MarginAccountsService
    description: |-
      Current public isolated-margin semantics:
       - a user has one parent margin account per application scope
       - opening orders create or reuse isolated position buckets under that parent
       - parent account creation is handled internally by margin workflows
  - name: MarketService
  - name: OrderbookService
  - name: OrdersService
  - name: PositionsService
    description: |-
      Current public isolated-margin semantics:
       - positions link to a parent margin account and, when applicable, a bucket id
       - opening orders create or reuse isolated position buckets under the parent
       - users can open another isolated position by reusing the parent account with a different market bucket
  - name: PulseService
  - name: SweeperService
  - name: TraderCodeService
  - name: TradesService
  - name: WhitelistService
  - name: WithdrawalsService
paths:
  /api/v1/orders/conditional/{conditionalOrderId}:
    get:
      tags:
        - OrdersService
      description: Get a single conditional (TP/SL) order by its UUID.
      operationId: get_conditional_order
      parameters:
        - name: conditionalOrderId
          in: path
          required: true
          schema:
            type: string
            default: 2b1a5f9c-0000-4000-8000-000000000004
          example: 2b1a5f9c-0000-4000-8000-000000000004
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConditionalOrder'
        '429':
          description: >-
            Read rate limit exceeded — every authenticated read draws one
            request from the account's read budget; retry after the interval in
            details.retryAfter
      security:
        - monacoSignature: []
        - monacoHttpSignature: []
components:
  schemas:
    ConditionalOrder:
      type: object
      properties:
        conditionalOrderId:
          type: string
          nullable: true
        tradingPairId:
          type: string
          nullable: true
          format: uuid
        marginAccountId:
          type: string
          nullable: true
        positionId:
          type: string
          nullable: true
        linkedGroupId:
          type: string
          nullable: true
        conditionType:
          type: string
          nullable: true
        triggerSource:
          type: string
          nullable: true
        triggerPrice:
          type: string
          nullable: true
        side:
          type: string
          nullable: true
        positionSide:
          type: string
          nullable: true
        orderType:
          type: string
          nullable: true
        limitPrice:
          type: string
          nullable: true
        quantity:
          type: string
          nullable: true
        slippageToleranceBps:
          type: integer
          format: int32
          nullable: true
        reduceOnly:
          type: boolean
          nullable: true
        timeInForce:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        triggeredOrderId:
          type: string
          nullable: true
        triggeredAt:
          type: string
          nullable: true
        cancelledAt:
          type: string
          nullable: true
        expiresAt:
          type: string
          nullable: true
        failureReason:
          type: string
          nullable: true
        createdAt:
          type: string
          nullable: true
        updatedAt:
          type: string
          nullable: true
        parentOrderId:
          type: string
          nullable: true
        associationType:
          type: string
          nullable: true
        activatedAt:
          type: string
          nullable: true
        version:
          example: 918342
          type: integer
          description: >-
            Opaque, compare-only revision counter for this conditional order's
            state: the sequencer step that wrote it. A strictly higher value is
            strictly newer state for that conditional order. The SAME counter is
            carried on every live `conditional_orders` WebSocket event and on
            the subscribe-time snapshot frame, always the version of the row the
            frame describes. Reconcile all three on `(conditionalOrderId,
            version)`: take the incoming row when `incoming.version >=
            local.version`, else keep local state. Note `>=`, not `>`: equal
            versions mean the SAME STEP rather than identical state, because one
            step can write several conditional rows (a trigger writes the
            triggered row and cancels its OCO sibling under one step). A REST
            row is that step's FINAL state, so it wins a tie. One consequence to
            plan for: the snapshot is read from the database, which lags the
            matching engine, so a transition that fires during the read is in
            neither the snapshot nor the delivered stream and cannot be ranked —
            re-read the affected rows if a conditional order's state matters at
            reconnect. Do not read anything else into the number: it is drawn
            from the same global sequence plain orders use, so values are
            sparse, gaps are normal, and it is not comparable across different
            conditional orders — nor against a plain order's version. Absent
            means unknown: a row last written before this field existed. Fall
            back to a full field comparison for those rather than treating
            absent as version zero.
          format: int64
          nullable: true
        triggeredOrder:
          allOf:
            - $ref: '#/components/schemas/TriggeredOrderSummary'
          description: >-
            Present only when state is TRIGGERED: the execution outcome of the
            order this conditional fired into (triggeredOrderId) — status,
            filled quantity, volume-weighted average fill price, taker fees and
            fill time — read from that order at request time. Trigger price and
            fill price are different numbers: the trigger fires on the mark
            price and the leg then trades against the book, so a MARKET leg
            fills at least the half-spread plus its own impact away from
            triggerPrice, and a LIMIT leg may still be resting (SUBMITTED /
            PARTIALLY_FILLED) or have been cut by the protective band (CANCELLED
            with a terminalReason). Absent while waiting on the trigger, on the
            conditional_orders WebSocket frames, and in the rare case the
            triggered order cannot be read.
          nullable: true
        trailBps:
          type: integer
          description: >-
            TRAILING_STOP only: retracement in basis points behind the
            watermark.
          format: int32
          nullable: true
        activationPrice:
          type: string
          description: >-
            TRAILING_STOP only: mark level that starts tracking. Absent when the
            stop armed immediately.
          nullable: true
        watermarkPrice:
          type: string
          description: >-
            TRAILING_STOP only: best mark (highest for a long, lowest for a
            short) observed since arming. triggerPrice is derived from it and
            only ever moves in the position's favour. Absent until the first
            mark is observed after arming.
          nullable: true
        trailArmedAt:
          type: string
          description: >-
            TRAILING_STOP only: when tracking began. Absent while the stop is
            still waiting for activationPrice (state stays ACTIVE in both
            phases).
          nullable: true
    TriggeredOrderSummary:
      type: object
      properties:
        orderId:
          example: 01a0887b-8e7c-7612-983f-b7ee89c2cbbf
          type: string
          description: >-
            The triggered order's id — the same value as the parent's
            triggeredOrderId, repeated so the summary is self-contained.
          nullable: true
          format: uuid
        status:
          example: SETTLED
          type: string
          description: >-
            The triggered order's CURRENT status, as GET
            /api/v1/orders/{orderId} reports it: SETTLED for a leg that filled
            in full (a fully filled order is written as SETTLED, so FILLED does
            not appear here); SUBMITTED or PARTIALLY_FILLED for a LIMIT leg
            still resting; CANCELLED when the protective band left nothing
            fillable or a reduce-only remainder was cut (see terminalReason);
            EXPIRED for a LIMIT leg that lapsed. Never REJECTED: a close the
            engine refused leaves the conditional order FAILED with no
            triggeredOrderId, so no summary exists for it.
          nullable: true
        filledQuantity:
          example: '3090659.3'
          type: string
          description: >-
            Quantity the triggered order has filled so far, in base units. "0"
            until it fills. Numerically equal to the order's own filledQuantity;
            the printed decimal scale can differ between this read (served from
            the database) and GET /api/v1/orders/{orderId} (served from the
            cache), so compare numerically.
          nullable: true
        averageFillPrice:
          example: '0.145611'
          type: string
          description: >-
            Volume-weighted average price the triggered order filled at. Compare
            with the parent's triggerPrice: the difference is the half-spread
            plus the order's own market impact. Absent until the first fill.
          nullable: true
        totalTakerFees:
          example: '202.52'
          type: string
          description: >-
            Total taker fees the triggered order has paid, in quote units.
            Absent until it fills.
          nullable: true
        filledAt:
          example: '2026-09-09T23:23:13.936682Z'
          type: string
          description: >-
            When the triggered order reached FILLED (RFC 3339). Absent while it
            is resting or partially filled, and on a terminal state that is not
            a full fill.
          nullable: true
        terminalReason:
          example: SYSTEM
          type: string
          description: >-
            Stable cause when status is CANCELLED — the same vocabulary as the
            order's own terminalReason. Absent otherwise.
          nullable: true
      description: |-
        The execution outcome of the order a conditional order fired into — a
         projection of that order's own row, read at request time (0XM-2744), so a
         TP/SL history can show what the close actually did next to the price that
         fired it. Trigger price and fill price are different numbers: the trigger
         fires on the mark, the leg then trades against the book, so a MARKET leg
         fills at least the half-spread (plus its own impact) away from the
         trigger, and a LIMIT leg may rest or fill only partly.
  securitySchemes:
    monacoSignature:
      type: apiKey
      description: >-
        Ed25519 session-key request signing. Every authenticated request carries
        three headers: `X-Monaco-PublicKey` (64-char lowercase-hex session
        public key), `X-Monaco-Timestamp` (Unix milliseconds, within 30s of
        server time), and `X-Monaco-Signature` (hex ed25519 signature). The
        signature is over `METHOD\npath?query\ntimestamp_ms\nSHA256_hex(body)`,
        where the body hash is the SHA-256 of the empty byte string when there
        is no body. Obtain the session keypair from `POST
        /api/v1/auth/challenge` followed by `POST /api/v1/auth/verify`.
      name: X-Monaco-Signature
      in: header
    monacoHttpSignature:
      type: apiKey
      description: >-
        RFC 9421 Ed25519 session-key request signatures. Send Signature-Input,
        Signature, and Content-Digest together; never combine them with
        X-Monaco-* credentials. The monaco signature covers @method, @path,
        @query, and content-digest in that order, with created (Unix seconds
        within 30s of server time), keyid (registered lowercase-hex session
        public key), and alg=ed25519 parameters. Content-Digest uses RFC 9530
        sha-256 over the exact body bytes, including the empty body. Query
        coverage retains ordering and percent encoding. Timestamp freshness does
        not reject repeated identical requests; use endpoint idempotency where
        supported. Existing legacy signing remains supported during server-first
        migration; SDK RFC 9421 signing is opt-in. See
        https://docs.0xmonaco.com/reference/http-message-signatures for the
        complete profile and trust model.
      name: Signature
      in: header

````

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