Enum Class FeeLeg

java.lang.Object
java.lang.Enum<FeeLeg>
com.wualabs.qtsurfer.engine.strategy.backtest.FeeLeg
All Implemented Interfaces:
Serializable, Comparable<FeeLeg>, Constable

public enum FeeLeg extends Enum<FeeLeg>
Which leg of the instrument pair a backtest fill's fee is charged on . Orthogonal to the per-side fee RATE (buyFeeRate / sellFeeRate): the rate says how much, the FeeLeg says in which asset.
  • Enum Constant Details

    • RECEIVED

      public static final FeeLeg RECEIVED
      Default. The fee is charged in the asset the fill receives: a BUY pays its fee in the BASE asset (you receive slightly less base — amount * rate), a SELL in the QUOTE asset (amount * price * rate). This is the everyday spot mechanic (Binance, Coinbase) and the canonical default the conformance fixtures encode.
    • QUOTE

      public static final FeeLeg QUOTE
      The fee is always charged in the QUOTE asset on both sides (amount * price * rate) — the convention for perpetual/derivatives venues (USDT-settled) and for simplified cash-PnL backtests.
    • BASE

      public static final FeeLeg BASE
      The fee is always charged in the BASE asset on both sides. RESERVED: no real venue charges spot fees this way, so it is not implemented — selecting it throws until a concrete need appears (kept as an enum slot so the contract is closed and forward-compatible).
  • Method Details

    • values

      public static FeeLeg[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FeeLeg valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null