Skip to main content

OrderDeniedReason

Enum OrderDeniedReason 

Source
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

§effective_quantity: Quantity

The order quantity after any quote-to-base conversion.

§max_quantity: Quantity

The instrument’s maximum tradable quantity.

§

QuantityBelowMinimum

The effective order quantity is below the instrument minimum.

Fields

§effective_quantity: Quantity

The order quantity after any quote-to-base conversion.

§min_quantity: Quantity

The instrument’s minimum tradable quantity.

§

NotionalExceedsMaxPerOrder

The order notional exceeds the configured maximum per order.

Fields

§max_notional: Money

The configured maximum notional per order.

§notional: Money

The order’s notional value.

§

NotionalExceedsMaximum

The order notional exceeds the instrument maximum.

Fields

§max_notional: Money

The instrument’s maximum notional.

§notional: Money

The order’s notional value.

§

NotionalBelowMinimum

The order notional is below the instrument minimum.

Fields

§min_notional: Money

The instrument’s minimum notional.

§notional: Money

The order’s notional value.

§

NotionalExceedsFreeBalance

The order notional exceeds the account free balance.

Fields

§free: Money

The account’s free balance.

§notional: Money

The order’s notional value.

§

CumNotionalExceedsFreeBalance

The cumulative order notional exceeds the account free balance.

Fields

§free: Money

The account’s free balance.

§cum_notional: Money

The cumulative notional across the checked orders.

§

MarginExceedsFreeBalance

The order initial margin exceeds the account free balance.

Fields

§free: Money

The account’s free balance.

§margin_required: Money

The initial margin required for the order.

§

CumMarginExceedsFreeBalance

The cumulative initial margin exceeds the account free balance.

Fields

§free: Money

The account’s free balance.

§cum_margin: Money

The cumulative initial margin across the checked orders.

§

InvalidMaxNotionalPerOrder

The configured maximum notional per order is invalid.

Fields

§instrument_id: InstrumentId

The instrument the setting applies to.

§value: Decimal

The invalid configured value.

§

InvalidOrderSide

The order side is invalid for this operation.

Fields

§order_side: OrderSide

The offending order side.

§

MissingExpireTime

A GTD order is missing its expire time.

§

ExpireTimeInPast

The order’s expire time is in the past.

Fields

§expire_time: String

The expire time that has already elapsed.

§

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: TrailingOffsetType

The unsupported trailing offset type.

§

TrailingStopCalcFailed

The trailing stop trigger price could not be calculated.

Fields

§detail: String

The underlying calculation error.

§

QuantityConversionFailed

The order quantity could not be converted for risk checks.

Fields

§detail: String

The underlying conversion error.

§

InstrumentNotFound

The instrument was not found in the cache.

Fields

§instrument_id: InstrumentId

The instrument that was not found.

§

PositionNotFound

The position for a reduce-only order was not found.

Fields

§position_id: PositionId

The position that was not found.

§

ReduceOnlyWouldIncreasePosition

A reduce-only order would increase the position.

Fields

§position_id: PositionId

The position the order would increase.

§

OrderListIncomplete

The order list is missing orders in the cache.

Fields

§order_list_id: OrderListId

The order list with missing orders.

§

OrderListDenied

The order was denied because its order list failed risk checks.

Fields

§order_list_id: OrderListId

The order list that failed risk checks.

§

TradingHalted

Trading is halted; new orders are denied.

§

TradingStateReducing

Trading is reducing; the order would increase exposure.

Fields

§order_side: OrderSide

The side of the order that would increase exposure.

§instrument_id: InstrumentId

The instrument the order applies to.

§

RateLimitExceeded

The order submission rate limit was exceeded.

§

NoExecutionClient

No execution client was found for the routed command.

Fields

§client_id: Option<ClientId>

The explicitly requested client, if one was supplied.

§routing_context: String

The routing context used to look up an execution client.

§

ClientVenueMismatch

The execution client does not handle the order venue.

Fields

§client_id: ClientId

The routed execution client.

§order_venue: Venue

The order venue.

§client_venue: Venue

The execution client’s venue.

§

SubmitFailed

Submitting the order to the execution client failed.

Fields

§detail: String

The underlying submission error.

§

InvalidPositionId

The supplied position ID is invalid for the order submission.

Fields

§position_id: PositionId

The invalid position ID.

§detail: String

The validation failure detail.

§

UnsupportedTimeInForce(TimeInForce)

The order’s time in force is not supported.

§

InvalidClientOrderId

The client order ID is invalid for the venue.

Fields

§detail: String

The validation failure detail.

§

UnsupportedOrderList

The venue does not support the requested order list.

Fields

§detail: String

The reason the order list is unsupported.

§

UnsupportedOrderType

The order type is not supported by the venue.

Fields

§order_type: OrderType

The unsupported order type.

§

UnsupportedTpSl

The venue does not support the requested take-profit/stop-loss parameters.

Fields

§detail: String

The reason the take-profit/stop-loss parameters are unsupported.

§

ValidationFailed

The order failed adapter validation before submission.

Fields

§detail: String

The validation failure detail.

§

StreamReconciling

A post-reconnect stream reconciliation is in progress; retry once it completes.

Trait Implementations§

Source§

impl Clone for OrderDeniedReason

Source§

fn clone(&self) -> OrderDeniedReason

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OrderDeniedReason

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for OrderDeniedReason

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for OrderDeniedReason

Source§

impl Error for OrderDeniedReason

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl<'_enum> From<&'_enum OrderDeniedReason> for OrderDeniedCode

Source§

fn from(val: &'_enum OrderDeniedReason) -> OrderDeniedCode

Converts to this type from the input type.
Source§

impl From<OrderDeniedReason> for OrderDeniedCode

Source§

fn from(val: OrderDeniedReason) -> OrderDeniedCode

Converts to this type from the input type.
Source§

impl IntoDiscriminant for OrderDeniedReason

Source§

type Discriminant = OrderDeniedCode

Enum listing the same variants as this enum but without any data fields
Source§

fn discriminant(&self) -> Self::Discriminant

Source§

impl PartialEq for OrderDeniedReason

Source§

fn eq(&self, other: &OrderDeniedReason) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for OrderDeniedReason

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Ungil for T
where T: Send,