pub struct PositionStatusReport {
pub account_id: AccountId,
pub instrument_id: InstrumentId,
pub position_side: PositionSideSpecified,
pub quantity: Quantity,
pub signed_decimal_qty: Decimal,
pub report_id: UUID4,
pub ts_last: UnixNanos,
pub ts_init: UnixNanos,
pub venue_position_id: Option<PositionId>,
pub avg_px_open: Option<Decimal>,
}Expand description
Represents a position status at a point in time.
Fields§
§account_id: AccountIdThe account ID associated with the position.
instrument_id: InstrumentIdThe instrument ID associated with the event.
position_side: PositionSideSpecifiedThe position side.
quantity: QuantityThe current open quantity.
signed_decimal_qty: DecimalThe current signed quantity as a decimal (positive for position side LONG, negative for SHORT).
report_id: UUID4The unique identifier for the event.
ts_last: UnixNanosUNIX timestamp (nanoseconds) when the last event occurred.
ts_init: UnixNanosUNIX timestamp (nanoseconds) when the event was initialized.
venue_position_id: Option<PositionId>The position ID (assigned by the venue).
avg_px_open: Option<Decimal>The reported average open price for the position.
Implementations§
Source§impl PositionStatusReport
impl PositionStatusReport
Sourcepub fn new(
account_id: AccountId,
instrument_id: InstrumentId,
position_side: PositionSideSpecified,
quantity: Quantity,
ts_last: UnixNanos,
ts_init: UnixNanos,
report_id: Option<UUID4>,
venue_position_id: Option<PositionId>,
avg_px_open: Option<Decimal>,
) -> Self
pub fn new( account_id: AccountId, instrument_id: InstrumentId, position_side: PositionSideSpecified, quantity: Quantity, ts_last: UnixNanos, ts_init: UnixNanos, report_id: Option<UUID4>, venue_position_id: Option<PositionId>, avg_px_open: Option<Decimal>, ) -> Self
Creates a new PositionStatusReport instance with required fields.
Sourcepub const fn has_venue_position_id(&self) -> bool
pub const fn has_venue_position_id(&self) -> bool
Checks if the position has a venue position ID.
Trait Implementations§
Source§impl CatalogPathPrefix for PositionStatusReport
impl CatalogPathPrefix for PositionStatusReport
Source§fn path_prefix() -> &'static str
fn path_prefix() -> &'static str
Returns the path prefix (directory name) for this data type.
Source§impl Clone for PositionStatusReport
impl Clone for PositionStatusReport
Source§fn clone(&self) -> PositionStatusReport
fn clone(&self) -> PositionStatusReport
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 PositionStatusReport
impl Debug for PositionStatusReport
Source§impl<'de> Deserialize<'de> for PositionStatusReport
impl<'de> Deserialize<'de> for PositionStatusReport
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 Display for PositionStatusReport
impl Display for PositionStatusReport
impl Eq for PositionStatusReport
Source§impl HasTsInit for PositionStatusReport
impl HasTsInit for PositionStatusReport
Source§impl PartialEq for PositionStatusReport
impl PartialEq for PositionStatusReport
Source§fn eq(&self, other: &PositionStatusReport) -> bool
fn eq(&self, other: &PositionStatusReport) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PositionStatusReport
impl Serialize for PositionStatusReport
impl StructuralPartialEq for PositionStatusReport
Auto Trait Implementations§
impl Freeze for PositionStatusReport
impl RefUnwindSafe for PositionStatusReport
impl Send for PositionStatusReport
impl Sync for PositionStatusReport
impl Unpin for PositionStatusReport
impl UnsafeUnpin for PositionStatusReport
impl UnwindSafe for PositionStatusReport
Blanket Implementations§
impl<T> Allocation for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.