API Reference / applyFill
Function: applyFill()
applyFill(
existing,fill):LedgerPosition
Defined in: src/execution/PositionLedger.ts:44
Folds one fill into a position's running average-cost state.
Pure and side-effect-free so every add/reduce/close/flip case is directly testable without a PositionLedger instance.
Parameters
existing
LedgerPosition | undefined