Skip to main content

check_position_reconciliation

Function check_position_reconciliation 

Source
pub fn check_position_reconciliation(
    report: &PositionStatusReport,
    cached_signed_qty: Decimal,
    size_precision: Option<u8>,
) -> bool
Expand description

Check if a cached position matches the venue position report within tolerance.

Compares the cached signed quantity against the venue-reported signed quantity, allowing a single-unit tolerance at the instrument’s size precision when provided.

§Returns

Returns true when positions match (within tolerance), false otherwise. Logs a debug message when values differ but fall within tolerance, and a warning when they fail to reconcile.