Enum PeriodType

java.lang.Object
java.lang.Enum<PeriodType>
com.studerw.tda.model.history.PeriodType
All Implemented Interfaces:
Serializable, Comparable<PeriodType>, java.lang.constant.Constable

public enum PeriodType extends Enum<PeriodType>

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 to FrequencyType, 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
  • Enum Constant Details

  • Method Details

    • values

      public static PeriodType[] 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

      public static PeriodType valueOf(String name)
      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 name
      NullPointerException - if the argument is null