Package com.studerw.tda.model.history
Enum PeriodType
- All Implemented Interfaces:
Serializable
,Comparable<PeriodType>
,java.lang.constant.Constable
Used in various price history requests and responses. Indicates the units in which the period parameter will be specified.
According to TDA docs with regard toFrequencyType
, if the PeriodType
is:
- day or null- the frequency type can be minute only
- month - the frequency type can be DAILY or WEEKLY
- year - the frequency type can be DAILY or WEEKLY or MONTHLY
- ytd - the frequency type can be DAILY or WEEKLY
With regard to the period parameter:
If the period is NOT SPECIFIED and the PeriodType
is:
- day - Then default period is 10.
- month - Then default period is 1.
- year - Then default period is 1.
- t- Then default period is 1.
Check that period follows TDA rules. Valid periods based on PeriodTypes:
- day: 1, 2, 3, 4, 5, 10*
- month: 1*, 2, 3, 6
- year - 1, 2, 3, 5 10, 15, 20
- ytd - 1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic PeriodType
Returns the enum constant of this type with the specified name.static PeriodType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
day
-
month
-
year
-
ytd
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-