Skip to main content
Package: monaco.api.orders Source: protos/api/orders.proto Use OrdersService for authenticated order management.

Notes

  • Order creation, cancellation, replacement, and listing require authentication.
  • Batch RPCs are the preferred path for multi-order workflows.
  • Attach TP/SL through order placement or PositionsService.AttachPositionTpSl.
  • GetConditionalOrder fetches a single TP/SL order by UUID — the same IDs returned as take_profit_order_id and stop_loss_order_id in CreateOrderResponse.
  • A trigger and the order it fires into are linked in both directions, and both reads are owner-scoped. GetConditionalOrder and ListConditionalOrders carry triggered_order — the close’s current status, filled quantity, average fill price, taker fees, fill time and terminal reason, read from that order at request time — present only once state is TRIGGERED and the close can be read, never on a FAILED conditional, and never on the conditional_orders WebSocket frames. GetOrder / ListOrders carry the reverse pointer conditional_order_id on a close the engine placed for a trigger; it is absent on client-placed orders, on TWAP children (they carry parent_order_id), and on closes older than the field, which are not backfilled.
  • ListOrders returns book orders only (LIMIT and MARKET): TWAP parents and conditional (TP/SL) orders are not rows of it under any status or trading_mode filter and are not counted in total; list them with ListTwapOrders and ListConditionalOrders. The close a trigger fired into is a book order and is listed as its own row carrying conditional_order_id.
  • ReplaceOrder and BatchReplaceOrders refuse to replace the LIMIT leg a TP/SL fired into — an order carrying conditional_order_id — the way a passive TWAP child is refused: a replacement rests under a new order id the conditional does not point at, which would sever the link both ways. The refusal names the conditional order and the original leg stays resting; in a batch the refused item’s original is never cancelled. Cancelling a triggered leg is unchanged.
  • TWAP parent orders execute a large order as scheduled market child orders across a time window. CreateTwapOrder, CancelTwapOrder, GetTwapOrder, and ListTwapOrders manage the parent lifecycle; GetTwapOrder returns the TwapOrder read model directly. Delegated-agent sessions are rejected for all TWAP RPCs. See TWAP Orders for the execution model.
  • GetTwapOrderTca returns the post-execution transaction cost analysis report for a terminal TWAP parent (COMPLETED or CANCELLED). A non-terminal parent is INVALID_ARGUMENT; another user’s parent is NOT_FOUND, indistinguishable from an unknown ID. The six analytics fields are optional and absent when they cannot be computed honestly.