pub struct PositionRecord {
pub symbol: String,
pub side: String,
pub size: Decimal,
pub avg_price: Option<Decimal>,
pub mark_price: Option<Decimal>,
pub unrealised_pnl: Option<Decimal>,
pub position_idx: i64,
pub category: String,
pub updated_time: i64,
}Expand description
A position of /v5/position/list or of the position stream.
Fields§
§symbol: StringThe symbol.
side: StringBuy for long, Sell for short, empty for no position.
size: DecimalThe size, always positive.
avg_price: Option<Decimal>The average entry price (avgPrice in the list, entryPrice in the stream).
mark_price: Option<Decimal>The mark price.
unrealised_pnl: Option<Decimal>The unrealised profit.
position_idx: i640 one-way mode, 1 long and 2 short side of hedge mode.
category: StringThe product category (the stream carries it).
updated_time: i64When the position last changed, milliseconds.
Trait Implementations§
Source§impl Clone for PositionRecord
impl Clone for PositionRecord
Source§fn clone(&self) -> PositionRecord
fn clone(&self) -> PositionRecord
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 PositionRecord
impl Debug for PositionRecord
Source§impl<'de> Deserialize<'de> for PositionRecord
impl<'de> Deserialize<'de> for PositionRecord
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
Auto Trait Implementations§
impl Freeze for PositionRecord
impl RefUnwindSafe for PositionRecord
impl Send for PositionRecord
impl Sync for PositionRecord
impl Unpin for PositionRecord
impl UnsafeUnpin for PositionRecord
impl UnwindSafe for PositionRecord
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