pub fn decimal_to_qty(decimal: Decimal) -> Result<Qty, &'static str>Expand description
Convert a Decimal quantity to fixed-point units
Similar to decimal_to_price but handles signed quantities. Quantities can be negative (for sells or position changes).
Examples:
- decimal_to_qty(Decimal::from_str(“100.0”)) = Ok(1000000)
- decimal_to_qty(Decimal::from_str(“-50.5”)) = Ok(-505000)