pub enum OrderDeniedReason {
Show 38 variants
QuantityExceedsMaximum {
effective_quantity: Quantity,
max_quantity: Quantity,
},
QuantityBelowMinimum {
effective_quantity: Quantity,
min_quantity: Quantity,
},
NotionalExceedsMaxPerOrder {
max_notional: Money,
notional: Money,
},
NotionalExceedsMaximum {
max_notional: Money,
notional: Money,
},
NotionalBelowMinimum {
min_notional: Money,
notional: Money,
},
NotionalExceedsFreeBalance {
free: Money,
notional: Money,
},
CumNotionalExceedsFreeBalance {
free: Money,
cum_notional: Money,
},
MarginExceedsFreeBalance {
free: Money,
margin_required: Money,
},
CumMarginExceedsFreeBalance {
free: Money,
cum_margin: Money,
},
InvalidMaxNotionalPerOrder {
instrument_id: InstrumentId,
value: Decimal,
},
InvalidOrderSide {
order_side: OrderSide,
},
MissingExpireTime,
ExpireTimeInPast {
expire_time: String,
},
MissingTriggerType,
MissingTrailingOffset,
MissingTrailingOffsetType,
UnsupportedTrailingOffsetType {
offset_type: TrailingOffsetType,
},
TrailingStopCalcFailed {
detail: String,
},
QuantityConversionFailed {
detail: String,
},
InstrumentNotFound {
instrument_id: InstrumentId,
},
PositionNotFound {
position_id: PositionId,
},
ReduceOnlyWouldIncreasePosition {
position_id: PositionId,
},
OrderListIncomplete {
order_list_id: OrderListId,
},
OrderListDenied {
order_list_id: OrderListId,
},
TradingHalted,
TradingStateReducing {
order_side: OrderSide,
instrument_id: InstrumentId,
},
RateLimitExceeded,
NoExecutionClient {
client_id: Option<ClientId>,
routing_context: String,
},
ClientVenueMismatch {
client_id: ClientId,
order_venue: Venue,
client_venue: Venue,
},
SubmitFailed {
detail: String,
},
InvalidPositionId {
position_id: PositionId,
detail: String,
},
UnsupportedTimeInForce(TimeInForce),
InvalidClientOrderId {
detail: String,
},
UnsupportedOrderList {
detail: String,
},
UnsupportedOrderType {
order_type: OrderType,
},
UnsupportedTpSl {
detail: String,
},
ValidationFailed {
detail: String,
},
StreamReconciling,
}Expand description
A standardized reason an order was denied locally by the Nautilus system.
A denial is a local rejection: the order never reached a venue. Each variant carries the
context needed to render its message and maps to a stable OrderDeniedCode.
Variants§
QuantityExceedsMaximum
The effective order quantity exceeds the instrument maximum.
Fields
QuantityBelowMinimum
The effective order quantity is below the instrument minimum.
Fields
NotionalExceedsMaxPerOrder
The order notional exceeds the configured maximum per order.
Fields
NotionalExceedsMaximum
The order notional exceeds the instrument maximum.
Fields
NotionalBelowMinimum
The order notional is below the instrument minimum.
Fields
NotionalExceedsFreeBalance
The order notional exceeds the account free balance.
CumNotionalExceedsFreeBalance
The cumulative order notional exceeds the account free balance.
Fields
MarginExceedsFreeBalance
The order initial margin exceeds the account free balance.
Fields
CumMarginExceedsFreeBalance
The cumulative initial margin exceeds the account free balance.
Fields
InvalidMaxNotionalPerOrder
The configured maximum notional per order is invalid.
Fields
instrument_id: InstrumentIdThe instrument the setting applies to.
value: DecimalThe invalid configured value.
InvalidOrderSide
The order side is invalid for this operation.
MissingExpireTime
A GTD order is missing its expire time.
ExpireTimeInPast
The order’s expire time is in the past.
MissingTriggerType
The order is missing a required trigger type.
MissingTrailingOffset
The order is missing a required trailing offset.
MissingTrailingOffsetType
The order is missing a required trailing offset type.
UnsupportedTrailingOffsetType
The order’s trailing offset type is not supported.
Fields
offset_type: TrailingOffsetTypeThe unsupported trailing offset type.
TrailingStopCalcFailed
The trailing stop trigger price could not be calculated.
QuantityConversionFailed
The order quantity could not be converted for risk checks.
InstrumentNotFound
The instrument was not found in the cache.
Fields
instrument_id: InstrumentIdThe instrument that was not found.
PositionNotFound
The position for a reduce-only order was not found.
Fields
position_id: PositionIdThe position that was not found.
ReduceOnlyWouldIncreasePosition
A reduce-only order would increase the position.
Fields
position_id: PositionIdThe position the order would increase.
OrderListIncomplete
The order list is missing orders in the cache.
Fields
order_list_id: OrderListIdThe order list with missing orders.
OrderListDenied
The order was denied because its order list failed risk checks.
Fields
order_list_id: OrderListIdThe order list that failed risk checks.
TradingHalted
Trading is halted; new orders are denied.
TradingStateReducing
Trading is reducing; the order would increase exposure.
Fields
instrument_id: InstrumentIdThe instrument the order applies to.
RateLimitExceeded
The order submission rate limit was exceeded.
NoExecutionClient
No execution client was found for the routed command.
Fields
ClientVenueMismatch
The execution client does not handle the order venue.
Fields
SubmitFailed
Submitting the order to the execution client failed.
InvalidPositionId
The supplied position ID is invalid for the order submission.
Fields
position_id: PositionIdThe invalid position ID.
UnsupportedTimeInForce(TimeInForce)
The order’s time in force is not supported.
InvalidClientOrderId
The client order ID is invalid for the venue.
UnsupportedOrderList
The venue does not support the requested order list.
UnsupportedOrderType
The order type is not supported by the venue.
UnsupportedTpSl
The venue does not support the requested take-profit/stop-loss parameters.
ValidationFailed
The order failed adapter validation before submission.
StreamReconciling
A post-reconnect stream reconciliation is in progress; retry once it completes.
Trait Implementations§
Source§impl Clone for OrderDeniedReason
impl Clone for OrderDeniedReason
Source§fn clone(&self) -> OrderDeniedReason
fn clone(&self) -> OrderDeniedReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OrderDeniedReason
impl Debug for OrderDeniedReason
Source§impl Display for OrderDeniedReason
impl Display for OrderDeniedReason
impl Eq for OrderDeniedReason
Source§impl Error for OrderDeniedReason
impl Error for OrderDeniedReason
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl<'_enum> From<&'_enum OrderDeniedReason> for OrderDeniedCode
impl<'_enum> From<&'_enum OrderDeniedReason> for OrderDeniedCode
Source§fn from(val: &'_enum OrderDeniedReason) -> OrderDeniedCode
fn from(val: &'_enum OrderDeniedReason) -> OrderDeniedCode
Source§impl From<OrderDeniedReason> for OrderDeniedCode
impl From<OrderDeniedReason> for OrderDeniedCode
Source§fn from(val: OrderDeniedReason) -> OrderDeniedCode
fn from(val: OrderDeniedReason) -> OrderDeniedCode
Source§impl IntoDiscriminant for OrderDeniedReason
impl IntoDiscriminant for OrderDeniedReason
Source§type Discriminant = OrderDeniedCode
type Discriminant = OrderDeniedCode
fn discriminant(&self) -> Self::Discriminant
Source§impl PartialEq for OrderDeniedReason
impl PartialEq for OrderDeniedReason
Source§fn eq(&self, other: &OrderDeniedReason) -> bool
fn eq(&self, other: &OrderDeniedReason) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OrderDeniedReason
Auto Trait Implementations§
impl Freeze for OrderDeniedReason
impl RefUnwindSafe for OrderDeniedReason
impl Send for OrderDeniedReason
impl Sync for OrderDeniedReason
impl Unpin for OrderDeniedReason
impl UnsafeUnpin for OrderDeniedReason
impl UnwindSafe for OrderDeniedReason
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.