Skip to main content

decode_price_increment

Function decode_price_increment 

Source
pub fn decode_price_increment(value: i64, precision: u8) -> Price
Expand description

Decodes a minimum price increment from the given value, expressed in units of 1e-9.

The precision is derived from the actual tick value to avoid truncation of fractional tick sizes (e.g., treasury futures with 1/256 or 1/32 ticks). The derived precision is floored at precision (typically the currency precision).