Record Class FeeContext
java.lang.Object
java.lang.Record
com.wualabs.qtsurfer.engine.strategy.backtest.simulation.FeeContext
- Record Components:
side- BUY or SELLliquidity- whether the fill took (Liquidity.TAKER) or made (Liquidity.MAKER) liquidityprice- the (post-slippage) execution pricebaseAmount- the base amount tradedinstrument- the engine-canonical instrument
public record FeeContext(OrderSide side, Liquidity liquidity, BigDecimal price, BigDecimal baseAmount, Instrument instrument)
extends Record
The inputs a
FeeModel needs to decide a fill's fee rate.-
Constructor Summary
ConstructorsConstructorDescriptionFeeContext(OrderSide side, Liquidity liquidity, BigDecimal price, BigDecimal baseAmount, Instrument instrument) Creates an instance of aFeeContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebaseAmountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinstrumentrecord component.Returns the value of theliquidityrecord component.price()Returns the value of thepricerecord component.side()Returns the value of thesiderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FeeContext
public FeeContext(OrderSide side, Liquidity liquidity, BigDecimal price, BigDecimal baseAmount, Instrument instrument) Creates an instance of aFeeContextrecord class.- Parameters:
side- the value for thesiderecord componentliquidity- the value for theliquidityrecord componentprice- the value for thepricerecord componentbaseAmount- the value for thebaseAmountrecord componentinstrument- the value for theinstrumentrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
side
-
liquidity
-
price
-
baseAmount
Returns the value of thebaseAmountrecord component.- Returns:
- the value of the
baseAmountrecord component
-
instrument
Returns the value of theinstrumentrecord component.- Returns:
- the value of the
instrumentrecord component
-