Class PositionRulesDTO

java.lang.Object
tech.cassandre.trading.bot.dto.position.PositionRulesDTO

public class PositionRulesDTO extends Object
Position rules for PositionDTO. This class is used to tell cassandre on which rules it should close a position. Supported rules: - Stop gain in percentage. - Stop loss in percentage.
  • Constructor Details

    • PositionRulesDTO

      protected PositionRulesDTO(PositionRulesDTO.Builder builder)
      Builder constructor.
      Parameters:
      builder - Builder.
  • Method Details

    • builder

      public static PositionRulesDTO.Builder builder()
      Returns builder.
      Returns:
      builder
    • equals

      public final boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • isStopGainPercentageSet

      public boolean isStopGainPercentageSet()
      Stop gain percentage has been set.
    • getStopGainPercentage

      public Float getStopGainPercentage()
      Stop gain percentage.
    • isStopLossPercentageSet

      public boolean isStopLossPercentageSet()
      Stop loss percentage has been set.
    • getStopLossPercentage

      public Float getStopLossPercentage()
      Stop loss percentage.