pub struct OrderParams {
pub kind: OrderKind,
pub decrease_position_swap_type: Option<DecreasePositionSwapType>,
pub min_output_amount: u128,
pub size_delta_usd: u128,
pub initial_collateral_delta_amount: u64,
pub trigger_price: Option<u128>,
pub acceptable_price: Option<u128>,
pub is_long: bool,
pub valid_from_ts: Option<i64>,
}
Expand description
Order Params.
Fields§
§kind: OrderKind
Order kind.
decrease_position_swap_type: Option<DecreasePositionSwapType>
Decrease Position Swap Type.
min_output_amount: u128
Minimum amount or value for output tokens.
- Amount for swap orders.
- Value for decrease position orders.
size_delta_usd: u128
Size delta usd.
initial_collateral_delta_amount: u64
Initial collateral delta amount.
trigger_price: Option<u128>
Trigger price (unit price).
acceptable_price: Option<u128>
Acceptable price (unit price).
is_long: bool
Whether the order is for a long or short position.
valid_from_ts: Option<i64>
Valid from timestamp.
Implementations§
Source§impl OrderParams
impl OrderParams
Sourcepub fn to_position_kind(&self) -> Result<PositionKind>
pub fn to_position_kind(&self) -> Result<PositionKind>
Get position kind.
Trait Implementations§
Source§impl Clone for OrderParams
impl Clone for OrderParams
Source§fn clone(&self) -> OrderParams
fn clone(&self) -> OrderParams
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for OrderParams
impl RefUnwindSafe for OrderParams
impl Send for OrderParams
impl Sync for OrderParams
impl Unpin for OrderParams
impl UnwindSafe for OrderParams
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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