pub struct OpenLimitOrder {
pub collateral: U256,
pub target_price: u128,
pub tp: u128,
pub sl: u128,
pub trader: Address,
pub leverage: u32,
pub created_at: u32,
pub last_updated: u32,
pub pair_index: u16,
pub order_type: u8,
pub index: u8,
pub buy: bool,
}Expand description
Open limit order information
Fields§
§collateral: U256Collateral amount in USDC (with 6 decimals)
target_price: u128Target price to execute at (with 18 decimals)
tp: u128Take profit price (with 18 decimals)
sl: u128Stop loss price (with 18 decimals)
trader: AddressTrader address
leverage: u32Leverage (with 2 decimals, e.g., 500 = 5x)
created_at: u32Creation timestamp
last_updated: u32Last update timestamp
pair_index: u16Pair index
order_type: u8Order type (0 = market, 1 = limit, 2 = stop)
index: u8Position index
buy: boolTrue for long, false for short
Trait Implementations§
Source§impl Clone for OpenLimitOrder
impl Clone for OpenLimitOrder
Source§fn clone(&self) -> OpenLimitOrder
fn clone(&self) -> OpenLimitOrder
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 moreSource§impl Debug for OpenLimitOrder
impl Debug for OpenLimitOrder
Source§impl<'de> Deserialize<'de> for OpenLimitOrder
impl<'de> Deserialize<'de> for OpenLimitOrder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for OpenLimitOrder
impl PartialEq for OpenLimitOrder
Source§fn eq(&self, other: &OpenLimitOrder) -> bool
fn eq(&self, other: &OpenLimitOrder) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for OpenLimitOrder
impl Serialize for OpenLimitOrder
impl StructuralPartialEq for OpenLimitOrder
Auto Trait Implementations§
impl Freeze for OpenLimitOrder
impl RefUnwindSafe for OpenLimitOrder
impl Send for OpenLimitOrder
impl Sync for OpenLimitOrder
impl Unpin for OpenLimitOrder
impl UnsafeUnpin for OpenLimitOrder
impl UnwindSafe for OpenLimitOrder
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
impl<'de, T> BorrowedRpcObject<'de> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> 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