pub struct CostEvent {
pub id: String,
pub position_id: String,
pub symbol: String,
pub side: Side,
pub ts: NaiveDateTime,
pub kind: CostKind,
pub amount: f64,
pub native_amount: Option<f64>,
pub native_currency: Option<String>,
pub conversion: Option<ConversionResult>,
pub size: f64,
pub nights: Option<u32>,
}Expand description
One commission or swap charge applied to the account during replay.
Fields§
§id: String§position_id: String§symbol: String§side: Side§ts: NaiveDateTime§kind: CostKind§amount: f64Signed account-currency charge, where positive reduced the balance.
native_amount: Option<f64>Signed charge before account conversion, when the charge was computed in the instrument’s native currency.
native_currency: Option<String>§conversion: Option<ConversionResult>§size: f64Lots the charge was computed on.
nights: Option<u32>Number of rollover nights, for swap charges only.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CostEvent
impl<'de> Deserialize<'de> for CostEvent
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
impl StructuralPartialEq for CostEvent
Auto Trait Implementations§
impl Freeze for CostEvent
impl RefUnwindSafe for CostEvent
impl Send for CostEvent
impl Sync for CostEvent
impl Unpin for CostEvent
impl UnsafeUnpin for CostEvent
impl UnwindSafe for CostEvent
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