What Enters Praxis
Praxis receives trade requests through Trading.submit_command() and TradingInbound.submit_command(). The command carries:
trade_idaccount_idsymbolsideqtyorder_typeexecution_mode- execution parameters such as
SingleShotParams timeout- optional
reference_price - maker preference and self-trade-prevention mode
- optional
strategy_idfor position attribution
SINGLE_SHOT is enabled by default. Other execution modes require explicit enablement for the deployment.
Lifecycle Stages
At a high level, the current happy path is:
- command accepted into the per-account execution queue
- slippage estimate computed from the order book when available
OrderSubmitIntentappended before venue submission- order submitted to venue
OrderSubmittedand optional inlineFillReceivedevents appended- WebSocket execution reports produce later fills or terminal order events
TradeClosedemitted when a terminal command closes the positionTradeOutcomeProducedrecords command progress or its terminal outcome for routing back to Nexus
The event sequence is not just audit data. It is what makes replay and recovery possible.
Order States
Order states are tracked through OrderStatus:
SUBMITTINGOPENPARTIALLY_FILLEDFILLEDCANCELEDREJECTEDEXPIRED
The current implementation creates the order in SUBMITTING when OrderSubmitIntent is projected, promotes it on venue submission or ack, updates filled quantity on each fill, and closes terminal orders into closed_orders.
Outcomes
Praxis produces TradeOutcome objects for Nexus. Those outcomes describe what actually happened, not just what the strategy asked for. The outcome path is currently callback-driven in-process, with the event spine retaining the same information for replay and audit.
Aborts And Expiry
Praxis supports abort handling through TradeAbort:
- Nexus or another caller submits an abort
- open venue orders are canceled
- filled quantity is preserved
- outcome reflects actual fills versus intended target
Expiry is enforced from the command timeout. If the deadline is exceeded, Praxis produces an expired terminal result rather than letting the command run forever.
Current Boundary
Praxis checks the order type and parameters for the selected mode at admission. See Command And Event Reference for the supported shapes.