@openpit/engine
    Preparing search index...

    Class ExecutionReportFillDetails

    Fill-details group: lock, fee, caller-calculated reservation remainder, last trade, and finality.

    Index
    • Constructs a fill-details group around the required lock.

      The lock is mandatory; the other fields default to absent and are set through their setters.

      Parameters

      Returns ExecutionReportFillDetails

    • get fee(): MonetaryAmount | undefined

      The fee amount and currency for this fill, or undefined.

      Returns MonetaryAmount | undefined

    • set fee(value: MonetaryAmount | MonetaryAmountInit | null | undefined): void

      Sets or clears the fee amount and currency.

      Accepts a MonetaryAmount object or a MonetaryAmountInit literal.

      Errors

      Throws ParamError/AssetError when a present value cannot be marshalled into the core value types.

      Parameters

      Returns void

    • get isFinal(): boolean | undefined

      Whether this report closes the order's report stream, or undefined.

      Returns boolean | undefined

    • set isFinal(value: boolean | null | undefined): void

      Sets the finality flag.

      Parameters

      • value: boolean | null | undefined

      Returns void

    • get lastTrade(): Trade | undefined

      The last executed trade, or undefined.

      Returns Trade | undefined

    • set lastTrade(value: Trade | TradeInit | null | undefined): void

      Sets the last executed trade (accepts a Trade object or a plain TradeInit literal).

      Errors

      Throws ParamError when value is neither a Trade nor a valid literal.

      Parameters

      Returns void

    • get lock(): Lock | undefined

      The reservation lock for this fill, or undefined when omitted from a plain object.

      Returns Lock | undefined

    • set lock(value: Lock): void

      Sets the reservation lock.

      Parameters

      Returns void

    • get remainingReservedQuantity(): Quantity | undefined

      The caller-calculated remainder of the order's pre-trade reservation, or undefined.

      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).

      Returns Quantity | undefined

    • set remainingReservedQuantity(
          value: string | number | bigint | Quantity | null | undefined,
      ): void

      Sets the caller-calculated reservation remainder.

      See the remainingReservedQuantity getter for the unit and what to pass. Accepts a value object or DecimalInput.

      Errors

      Throws ParamError on an invalid value.

      Parameters

      • value: string | number | bigint | Quantity | null | undefined

      Returns void

    • Returns void

    • Returns void