pub struct Fill {
pub symbol: Symbol,
pub side: Side,
pub quantity: Quantity,
pub price: Price,
pub timestamp: NanoTimestamp,
pub commission: Decimal,
}Expand description
A single trade execution event.
Fields§
§symbol: SymbolThe instrument traded.
side: SideWhether this fill is a buy (Bid) or sell (Ask).
quantity: QuantityThe number of units traded.
price: PriceThe execution price.
timestamp: NanoTimestampWhen the fill occurred.
commission: DecimalCommission charged.
Implementations§
Source§impl Fill
impl Fill
Sourcepub fn new(
symbol: Symbol,
side: Side,
quantity: Quantity,
price: Price,
timestamp: NanoTimestamp,
) -> Self
pub fn new( symbol: Symbol, side: Side, quantity: Quantity, price: Price, timestamp: NanoTimestamp, ) -> Self
Constructs a Fill without commission (zero commission).
Sourcepub fn with_commission(
symbol: Symbol,
side: Side,
quantity: Quantity,
price: Price,
timestamp: NanoTimestamp,
commission: Decimal,
) -> Self
pub fn with_commission( symbol: Symbol, side: Side, quantity: Quantity, price: Price, timestamp: NanoTimestamp, commission: Decimal, ) -> Self
Constructs a Fill with the specified commission.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Fill
impl<'de> Deserialize<'de> for Fill
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 Fill
impl RefUnwindSafe for Fill
impl Send for Fill
impl Sync for Fill
impl Unpin for Fill
impl UnsafeUnpin for Fill
impl UnwindSafe for Fill
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