GetOrderLifecycle
Available in v1.13.2
Requires CrossTrade XT Add-On v1.13.2 or later.
Returns the complete lifecycle of a single order: every NT8 state transition (Submitted, Working, Filled, Cancelled, and so on), every inbound API submission attempt against the order, and optionally every fill from NT8's in-memory Executions, merged into one chronological timeline.
| Property | Value |
|---|---|
| Required scope | mcp:read |
| Risk | None. Read-only. |
| Side effects | None. |
When an agent should use it
- After a stream interruption, to reconcile what happened to a known order.
- During post-trade review, to explain a fill price or a cancellation reason.
- When a user asks "what happened to my order?" and
GetOrderonly shows the current state without context. - When debugging an order that was placed but never appeared in
ListOrders(lifecycle will show whether it was rejected at the API layer).
When an agent should not use it
- As a substitute for
GetOrderStatusorGetOrderfor a quick current-state read. The lifecycle endpoint is heavier; prefer the lighter ones for live polling. - For account-wide history (it is per-order). Use
GetJournalTradesfor cross-account history.
Parameters
{
"orderId": "50cca7b8051146c684087db511107983",
"includeFills": true,
"includeRaw": false,
"limit": 200
}
Only orderId is required. orderId accepts either the NT8-assigned ID or the original/xt ID used at placement. The other args are optional:
includeFills(boolean, defaulttrue): merge fill events from NT8's Executions.includeRaw(boolean, defaultfalse): include the full raw JSON snapshot for each event.limit(integer, default200, hard max2000): cap on rows returned.
Response shape
{
"success": true,
"orderId": "50cca7b8051146c684087db511107983",
"originalOrderId": "myStrat_entry_42",
"account": "Sim101",
"count": 3,
"events": [
{
"timestamp": "2026-05-22T14:30:12.118Z",
"epoch": 1779114612118.0,
"source": "api_received",
"event": "PlaceOrder",
"orderState": null,
"orderId": "myStrat_entry_42",
"limitPrice": 5235.00,
"quantity": 1,
"reason": null
},
{
"timestamp": "2026-05-22T14:30:12.241Z",
"epoch": 1779114612241.0,
"source": "order_update",
"event": "Working",
"orderState": "Working",
"orderId": "50cca7b8051146c684087db511107983",
"originalOrderId": "myStrat_entry_42",
"filled": 0,
"limitPrice": 5235.00
},
{
"timestamp": "2026-05-22T14:31:48.911Z",
"epoch": 1779114708911.0,
"source": "order_update",
"event": "Filled",
"orderState": "Filled",
"filled": 1,
"avgFillPrice": 5235.00
}
]
}
source values
api_received: the add-on accepted an inbound API call for this order.api_rejected: the add-on rejected the call before reaching NT8.reasoncarries the error.order_update: NT8 emitted anAccount.OrderUpdateevent.orderStateis the NT8 state.execution: fill row synthesized from NT8 in-memory Executions. Only present whenincludeFills=true.
Example user prompt
A user says their LIMIT buy never filled but they thought it was working.
Pull the lifecycle for order 50cca7b8051146c684087db511107983 and tell me
whether it was rejected, cancelled, replaced, or simply never triggered.
Example tool call
{
"name": "GetOrderLifecycle",
"arguments": {
"orderId": "50cca7b8051146c684087db511107983",
"includeFills": true
}
}
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
success: false, error: "not_found" | Order ID doesn't exist on this machine, or pre-dates v1.13.2. | Confirm the ID is correct. Older orders have no lifecycle history. |
success: false, error: "missing_args" | Called without orderId. | Always pass orderId. |
Empty events after includeFills=true | SQL returned exactly limit rows, leaving no room for fills. | Bump limit (max 2000). |
addon_disconnected | Add-on side is down. | Open NinjaTrader with the CrossTrade add-on connected. |
Related tools
ListOrders— working and recent orders for an account, plus pointers toGetOrderandGetOrderStatusfor single-order current-state readsGetJournalTrades— matched round-trip trades across accounts