@openpit/engine
    Preparing search index...

    Interface ExecutionReportFillDetailsInit

    Plain-object form of ExecutionReportFillDetails.

    interface ExecutionReportFillDetailsInit {
        fee?: MonetaryAmount | MonetaryAmountInit;
        isFinal?: boolean;
        lastTrade?: Trade | TradeInit;
        lock?: Lock;
        remainingReservedQuantity?: string | number | bigint | Quantity;
    }
    Index
    isFinal?: boolean
    lastTrade?: Trade | TradeInit
    lock?: Lock
    remainingReservedQuantity?: string | number | bigint | Quantity

    Caller-calculated remainder of the order's pre-trade reservation.

    The engine releases this remainder when the order's final execution report arrives. It is not the venue-reported remaining order quantity (FIX LeavesQty): never copy venue leaves into it, since a money-sized order's venue leaves may be a money amount.

    It is always a quantity of the instrument's underlying (base) asset, even for an order sized by volume (money), never a settlement or money amount.

    For an order sized with TradeAmount.volume(...) (money), the reserved quantity is what the engine sized during pre-trade: volume divided by the absolute lock price, using the engine's decimal division (zero for a drop-copy order recorded at a zero price). Do not re-derive it from unspent volume at fill prices.

    On every execution report, pass max(0, reserved quantity - sum of all fill quantities recorded for the order so far, including this report's fill).

    • On a non-final report, such as a partial fill, pass the remainder after this fill. The engine releases nothing.
    • On a final report cancelling a partially filled order, pass the same remainder. The engine releases exactly that part of the reservation, valued at the lock price, using the same side and price-sign rules as when reserving.
    • On a final report of an order the venue reports fully filled, pass the remainder too. It is zero only once the recorded fills reach or exceed the reserved quantity; an order sized by volume can be fully filled while its recorded fills stay below the reserved quantity, and the final report must carry that remainder for the engine to release it.

    For example, a buy sized at 1000 USD by volume with lock price 100 reserves 10 units. A partial fill of 6 passes 4 and releases nothing; a later cancel passes 4 and releases the rest of the reservation (400 USD at the lock price).