Struct trade_aggregation::Trade
source · pub struct Trade {
pub timestamp: i64,
pub price: f64,
pub size: f64,
}
Expand description
Defines a taker trade
Fields§
§timestamp: i64
Timestamp, assumed to be in milliseconds
price: f64
Price of the asset
size: f64
Size of the trade negative values indicate a taker Sell order
Trait Implementations§
source§impl PartialEq for Trade
impl PartialEq for Trade
source§impl TakerTrade for Trade
impl TakerTrade for Trade
source§fn size(&self) -> f64
fn size(&self) -> f64
Number of shares or contracts in this trade.
A negative value indicates
that the trade was executed on the bid (market sell order).
source§fn timestamp_resolution(&self) -> TimestampResolution
fn timestamp_resolution(&self) -> TimestampResolution
units for the timestamp integer returned by [
TakerTrade.timestamp()
] method
A default implementation is included and assumes millisecondsimpl Copy for Trade
impl StructuralPartialEq for Trade
Auto Trait Implementations§
impl Freeze for Trade
impl RefUnwindSafe for Trade
impl Send for Trade
impl Sync for Trade
impl Unpin for Trade
impl UnwindSafe for Trade
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