nautechsystems/nautilus_trader · error
Unsupported order type {} for update_order
Error message
Unsupported order type {} for update_order What it means
The matching engine's update_order (order modify) routine reached a catch-all match arm for an order type it does not support modifying. Only certain order types (e.g. Limit, Stop-Market/Limit with modifiable fields) support update; anything else panics. The requested modify operation is incompatible with the order's type.
Source
Thrown at crates/execution/src/matching_engine/mod.rs:6112
ModifyOutcome::Applied
}
}
OrderAny::TrailingStopLimit(_) => {
match (
price.or(order.price()),
trigger_price.or(order.trigger_price()),
) {
(Some(price), Some(trigger_price)) => {
self.update_limit_if_touched_order(order, quantity, price, trigger_price)
}
_ => {
self.generate_order_updated(order, quantity, price, trigger_price, None);
ModifyOutcome::Applied
}
}
}
_ => {
panic!(
"Unsupported order type {} for update_order",
order.order_type()
);
}
};
if outcome == ModifyOutcome::Rejected {
return false;
}
// If order now has zero leaves after update, cancel it
let new_leaves_qty = quantity.saturating_sub(filled_qty);
if new_leaves_qty.is_zero() {
if self.config.support_contingent_orders
&& order.contingency_type().is_some()
&& update_contingencies
{
self.update_contingent_order(order, quantity);View on GitHub (pinned to 18893faf8b)
Solutions
- Only send modify/update commands for order types that support it (typically Limit and Stop orders); cancel-and-resubmit for others.
- Check order.order_type() before calling update_order and route unsupported types to cancel+submit.
- Fix strategy logic that assumes all order types can be amended.
- Update the adapter to reject amend requests for unsupported types upstream of the matching engine.
Example fix
// before
engine.update_order(&order, new_qty, new_price, trigger);
// after
match order.order_type() {
OrderType::Limit | OrderType::StopLimit => engine.update_order(&order, new_qty, new_price, trigger),
_ => { engine.cancel_order(&order); engine.submit(new_order_with(new_qty, new_price)); }
} Defensive patterns
Strategy: validation
Validate before calling
const MODIFIABLE: &[OrderType] = &[OrderType::Limit, OrderType::StopLimit, OrderType::StopMarket];
if !MODIFIABLE.contains(&order.order_type()) {
// route to cancel + resubmit instead of update_order
} Type guard
fn is_modifiable(order: &OrderAny) -> bool {
matches!(order.order_type(), OrderType::Limit | OrderType::StopLimit | OrderType::StopMarket)
} Prevention
- Only amend Limit/Stop order types; use cancel-and-resubmit for everything else.
- Centralize modify logic in one helper that checks order_type first.
- Have adapters reject unsupported amend requests before they reach the engine.
- Review strategies that modify orders after partial fills, where type conversions may occur.
When it happens
Trigger: Calling update_order (via OrderEmulator/MatchingEngine modify path, e.g. handling an OrderModify or MODIFY command) on an order whose order_type() is not one of the handled modifiable types — e.g. Market, Market-To-Limit, or other types hitting the `_` arm.
Common situations: Submitting a modify request for price/quantity on a Market order; an emulator or strategy modifying an order type changed after partial fills/conversion; adapter forwarding venue amend requests for unsupported order types.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Matching engine not found for instrument {order_instrument_i
- Matching engine not found for instrument {instrument_id}
- Position id should be generated. Hedging Oms type order matc
- OTO parent not found
- Cannot find contingent order for {client_order_id}
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/52263eeffceee4f4.
Report an issue: GitHub.