Trait trade_aggregation::TakerTrade

source ·
pub trait TakerTrade {
    // Required methods
    fn timestamp(&self) -> i64;
    fn price(&self) -> f64;
    fn size(&self) -> f64;

    // Provided method
    fn timestamp_resolution(&self) -> TimestampResolution { ... }
}
Expand description

Trait to enable third party types to be passed into aggregators.

Required Methods§

source

fn timestamp(&self) -> i64

The timestamp of a trade,

source

fn price(&self) -> f64

Fill price of the transaction

source

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).

Provided Methods§

source

fn timestamp_resolution(&self) -> TimestampResolution

units for the timestamp integer returned by [TakerTrade.timestamp()] method A default implementation is included and assumes milliseconds

Implementors§