Class RebalancingConditions

java.lang.Object
net.jacobpeterson.alpaca.openapi.broker.model.RebalancingConditions

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-03-23T18:58:47.485165-07:00[America/Los_Angeles]") public class RebalancingConditions extends Object
RebalancingConditions
  • Field Details

  • Constructor Details

    • RebalancingConditions

      public RebalancingConditions()
  • Method Details

    • type

      public RebalancingConditions type(String type)
    • getType

      @Nullable public String getType()
      Possible values of drift_band or calendar
      Returns:
      type
    • setType

      public void setType(String type)
    • subType

      public RebalancingConditions subType(String subType)
    • getSubType

      @Nullable public String getSubType()
      For type = drift_band: absolute or relative. For type = calendar: weekly,monthly, quarterly or annually
      Returns:
      subType
    • setSubType

      public void setSubType(String subType)
    • percent

      public RebalancingConditions percent(String percent)
    • getPercent

      @Nullable public String getPercent()
      Must be a positive value, up to two decimal places. Only permitted and required for type = drift_band. This is the max allowable drift percent from any target weight (+/-)
      Returns:
      percent
    • setPercent

      public void setPercent(String percent)
    • day

      public RebalancingConditions day(String day)
    • getDay

      @Nullable public String getDay()
      Used to specify the rebalancing day for conditions of type = calendar. Only permitted and required for type = calendar. In scenarios when the specified day aligns to a non-trading day, the rebalance will be triggered on the preceding trading day. For type= annually, the value must be passed in MM-DD format. If 02-29 is specified and the current year is not a leap year, the rebalance will occur on the trading day preceding 2/29. For type= quarterly and monthly the value must be an integer between 1 and 31 inclusive. This represents the day of month. For quarterly, rebalancing will trigger on this day in January, March, June, and December. If the specified day is non-existent for the month then the rebalancing will trigger on the preceding trading day. For type = weekly, permitted values are Monday, Tuesday, Wednesday, Thursday, Friday.
      Returns:
      day
    • setDay

      public void setDay(String day)
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Throws:
      IOException
    • fromJson

      public static RebalancingConditions fromJson(String jsonString) throws IOException
      Create an instance of RebalancingConditions given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of RebalancingConditions
      Throws:
      IOException - if the JSON string is invalid with respect to RebalancingConditions
    • toJson

      public String toJson()
      Convert an instance of RebalancingConditions to an JSON string
      Returns:
      JSON string