Skip to main content

derive_market_order_price

Function derive_market_order_price 

Source
pub fn derive_market_order_price(
    quote: &QuoteTick,
    is_buy: bool,
    price_decimals: u8,
    slippage_bps: u32,
) -> Decimal
Expand description

Derives a market order limit price from a quote with a configurable slippage buffer in basis points, rounded to 5 significant figures and clamped to the instrument’s price precision.