pub trait SpreadPriceRounder {
// Required method
fn round_prices(
&self,
raw_bid: f64,
raw_ask: f64,
precision: u8,
) -> (Price, Price);
}Expand description
Rounder for spread bid/ask (e.g. tick scheme). When absent, raw prices are used with instrument precision.
Required Methods§
Sourcefn round_prices(
&self,
raw_bid: f64,
raw_ask: f64,
precision: u8,
) -> (Price, Price)
fn round_prices( &self, raw_bid: f64, raw_ask: f64, precision: u8, ) -> (Price, Price)
Rounds raw bid/ask to valid prices (handles negative prices with mirroring when using tick scheme).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".