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
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
static RebalancingConditions
Create an instance of RebalancingConditions given an JSON stringgetDay()
Used to specify the rebalancing day for conditions of type = calendar.Must be a positive value, up to two decimal places.For type = drift_band: absolute or relative.getType()
Possible values of drift_band or calendarint
hashCode()
void
void
setPercent
(String percent) void
setSubType
(String subType) void
toJson()
Convert an instance of RebalancingConditions to an JSON stringtoString()
static void
validateJsonElement
(com.google.gson.JsonElement jsonElement)
-
Field Details
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_SUB_TYPE
- See Also:
-
SERIALIZED_NAME_PERCENT
- See Also:
-
SERIALIZED_NAME_DAY
- See Also:
-
openapiFields
-
openapiRequiredFields
-
validate
public static boolean validate -
isValid
-
-
Constructor Details
-
RebalancingConditions
public RebalancingConditions()
-
-
Method Details
-
type
-
getType
Possible values of drift_band or calendar- Returns:
- type
-
setType
-
subType
-
getSubType
For type = drift_band: absolute or relative. For type = calendar: weekly,monthly, quarterly or annually- Returns:
- subType
-
setSubType
-
percent
-
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
-
day
-
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
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
- Throws:
IOException
-
fromJson
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
Convert an instance of RebalancingConditions to an JSON string- Returns:
- JSON string
-