Skip to main content

apply_fill_to_positions

Function apply_fill_to_positions 

Source
pub fn apply_fill_to_positions(
    positions: &mut HashMap<(WalletAddress, String), EnginePosition>,
    wallet: WalletAddress,
    symbol: String,
    signed_qty: Decimal,
    fill_price: Decimal,
)
Expand description

Apply a fill to the engine position map, creating or removing entries as needed.

This is a map-level helper that wraps EnginePosition::apply_fill with HashMap insert/remove semantics. The pure position math lives in the engine crate.