Struct lfest::Position [−][src]
pub struct Position { /* fields omitted */ }
Expand description
Describes the position information of the account
Implementations
Create a new, initially neutral, position with a given leverage
Panics
In debug mode, if leverage is smaller than 1.0
Create a new position with all fields custom. NOTE: not usually called, but for advanced use cases
Panics
In debug mode, if inputs don’t make sense
Return the position size denoted in BASE currency if using linear futures, denoted in QUOTE currency if using inverse futures
Return the entry price of the position
Return the positions unrealized profit and loss denoted in QUOTE when using linear futures, denoted in BASE when using inverse futures
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for Position
impl UnwindSafe for Position
Blanket Implementations
Mutably borrows from an owned value. Read more