Monaco Protocol SDK v0.7.9
Parent TP/SL at Order Placement
You can now attach take-profit and stop-loss brackets directly when placing a limit or market order. Previously, TP/SL required a separatecreateConditionalOrder call after the order was open. With parent TP/SL, the
legs are submitted atomically with the entry order and the matching engine owns
their full lifecycle.
Attaching brackets on placement
PasstakeProfit and/or stopLoss in the options of placeLimitOrder or
placeMarketOrder. Both are margin-only and cannot be combined with
reduceOnly: true.
placeMarketOrder.
Leg shape
quantity field — it inherits the parent order’s quantity.
Lifecycle
If the parent fills immediately, the attached TP/SL legs move directly toACTIVE. If the parent rests on the book, the legs start as PENDING_PARENT
and activate once the parent fill creates or extends a position.
OCO behaviour: when one leg triggers, the matching engine automatically
cancels the sibling. Cancelling the unfilled parent order also cancels any
PENDING_PARENT children.
New ConditionalOrder fields
listConditionalOrders responses now include:
WebSocket changes
Theconditional_order_update event gains matching fields and two new reason
values:
reason values:
activated—PENDING_PARENTleg becameACTIVEafter the parent filledparent_cancelled— parent order was cancelled before filling, leg was purgedoco_cancelled— sibling leg triggered first, this leg was cancelled by OCO
Deprecated: standalone createConditionalOrder
sdk.trading.createConditionalOrder is deprecated for TP/SL use. New
integrations should use parent TP/SL (this release) or
sdk.positions.attachPositionTpSl for existing positions. The method remains
available but will be removed in a future release.
Migration
No breaking changes. All new fields are additive. If you usecreateConditionalOrder today and want to migrate to parent TP/SL:

