pub enum OrderErrorType {
Show 27 variants
AccountFrozen,
AmountExceedsAvailableBalance(UD128, UD128),
CancelExistingInvalidCloseOrders,
CantChangeCloseOrder,
ChangeExpiredOrderNeedsNewExpiry,
CloseOrderExceedsPosition,
CloseOrderPositionMismatch,
ContractNotOperational,
CrossesBook,
ExceedsLastExecutionBlock,
ImmediateOrCancelExecuted,
InsuficientFundsForRecycleFee,
InvalidExpiryBlock,
InvalidOrderId,
MakerOrderSettlementFailed,
MaxMatchesReached,
MaximumAccountOrders,
OrderDoesNotExist,
OrderExtensionRejected,
OrderPostFailed(u16),
OrderSettlementImpliesInsolvent,
OrderSizeExceedsAvailableSize,
PostOrderUnderMinimum,
PriceOutOfRange,
SizeOutOfRange,
ValueExceedsMaximum,
WrongAccountForOrder,
}Expand description
Type of order request failure with corresponding details.
Variants§
AccountFrozen
Account is frozen.
AmountExceedsAvailableBalance(UD128, UD128)
Required amount exceeds available balance.
CancelExistingInvalidCloseOrders
Existing close orders mismatch the actual position type and need to be cancelled before issuing new close orders.
CantChangeCloseOrder
Close orders can not be changed.
ChangeExpiredOrderNeedsNewExpiry
Provide new expiration to change expired order.
CloseOrderExceedsPosition
Close order size exceeds position size.
CloseOrderPositionMismatch
Close order side mismatches position type.
ContractNotOperational
Perpetual contract is not operational.
CrossesBook
Post-only order crosses the book.
ExceedsLastExecutionBlock
Current block exceeds last execution block specified for the order.
ImmediateOrCancelExecuted
Immediate-or-cancel order was not completely filled.
InsuficientFundsForRecycleFee
Available account balance can not cover recycling fee payment.
InvalidExpiryBlock
Current block exceeds expiration block specified for the order.
InvalidOrderId
Specified order ID is out of range.
MakerOrderSettlementFailed
Failed to settle maker order.
MaxMatchesReached
Maximum number of matches reached for the taker order.
MaximumAccountOrders
Account reached limit of orders to post.
OrderDoesNotExist
Order does not exist.
OrderExtensionRejected
Builder-code order extension failed a recoverable decode check (unknown envelope version, or a builder field out of range) on a batched or forwarded V2 request, so this single order was skipped while the rest of the batch proceeded.
OrderPostFailed(u16)
Order posting failed with status.
OrderSettlementImpliesInsolvent
Settlement of the order will render perpetual contract insolvent.
OrderSizeExceedsAvailableSize
Size of close order exceeds remaining position size.
PostOrderUnderMinimum
Order to be posted is under minimum amount.
PriceOutOfRange
Specified order price is out of range.
SizeOutOfRange
Specified order size is out of range.
ValueExceedsMaximum
Maximum PnL slippage value exceeds maximum of 65535
WrongAccountForOrder
Another account owns the order.
Trait Implementations§
Source§impl Clone for OrderErrorType
impl Clone for OrderErrorType
Source§fn clone(&self) -> OrderErrorType
fn clone(&self) -> OrderErrorType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OrderErrorType
Auto Trait Implementations§
impl Freeze for OrderErrorType
impl RefUnwindSafe for OrderErrorType
impl Send for OrderErrorType
impl Sync for OrderErrorType
impl Unpin for OrderErrorType
impl UnsafeUnpin for OrderErrorType
impl UnwindSafe for OrderErrorType
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more