pub enum RequestType {
OpenLong,
OpenShort,
CloseLong,
CloseShort,
Cancel,
IncreasePositionCollateral,
Change,
}Expand description
Type of the order request.
RequestType::OpenLongis used to open a long position (or to decrease, close, or invert a long position). The only restrictions applied are the user account must have sufficient collateral available.RequestType::OpenShortis used to open a short position (or to decrease, close, or invert a short position). The only restrictions applied are the user account must have sufficient collateral available.RequestType::CloseLongis a reduce only order type and can only be used to close all or part of an existing long position on the perpetual contract.RequestType::CloseShortis a reduce only order type and can only be used to close all or part of an existing short position on the perpetual contract.RequestType::Cancelis used to cancel an existing order on the perpetual contract’s order book.RequestType::IncreasePositionCollateralis an operation to increase the collateral of an existing position in the event that it has insufficient margin or the account holder wishes to reduce leverage.RequestType::Changeis an operation to change parameters of an existing order, gas-efficiently.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for RequestType
impl Clone for RequestType
Source§fn clone(&self) -> RequestType
fn clone(&self) -> RequestType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RequestType
Source§impl Debug for RequestType
impl Debug for RequestType
Source§impl From<RequestType> for OrderType
impl From<RequestType> for OrderType
Source§fn from(value: RequestType) -> Self
fn from(value: RequestType) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RequestType
impl RefUnwindSafe for RequestType
impl Send for RequestType
impl Sync for RequestType
impl Unpin for RequestType
impl UnsafeUnpin for RequestType
impl UnwindSafe for RequestType
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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