pub struct CloseEvent {Show 17 fields
pub id: String,
pub action_id: Option<String>,
pub fill_id: Option<String>,
pub position_id: String,
pub symbol: String,
pub side: Side,
pub ts: NaiveDateTime,
pub size: f64,
pub price: f64,
pub entry_price: Option<f64>,
pub pnl: f64,
pub commission: f64,
pub native_pnl: Option<f64>,
pub native_currency: Option<String>,
pub pnl_conversion: Option<ConversionResult>,
pub reason: CloseReason,
pub remaining_size: Option<f64>,
}Expand description
A realized close, including partial closes, in additive account currency.
Fields§
§id: String§action_id: Option<String>§fill_id: Option<String>§position_id: String§symbol: String§side: Side§ts: NaiveDateTime§size: f64§price: f64§entry_price: Option<f64>Remaining-inventory average cost used to realize this close.
pnl: f64Realized profit and loss for this close, already net of commission.
commission: f64Account-currency exit commission already subtracted from pnl.
native_pnl: Option<f64>§native_currency: Option<String>§pnl_conversion: Option<ConversionResult>§reason: CloseReason§remaining_size: Option<f64>Remaining size after this close when known.
Implementations§
Trait Implementations§
Source§impl Clone for CloseEvent
impl Clone for CloseEvent
Source§impl Debug for CloseEvent
impl Debug for CloseEvent
Source§impl Default for CloseEvent
impl Default for CloseEvent
Source§impl<'de> Deserialize<'de> for CloseEventwhere
CloseEvent: Default,
impl<'de> Deserialize<'de> for CloseEventwhere
CloseEvent: Default,
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 CloseEvent
impl PartialEq for CloseEvent
Source§impl Serialize for CloseEvent
impl Serialize for CloseEvent
impl StructuralPartialEq for CloseEvent
Auto Trait Implementations§
impl Freeze for CloseEvent
impl RefUnwindSafe for CloseEvent
impl Send for CloseEvent
impl Sync for CloseEvent
impl Unpin for CloseEvent
impl UnsafeUnpin for CloseEvent
impl UnwindSafe for CloseEvent
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