Package com.studerw.tda.model.history
Class PriceHistReq
java.lang.Object
com.studerw.tda.model.history.PriceHistReq
Encapsulates the necessary parameters for a TdaClient.priceHistory(PriceHistReq)
call. Use the PriceHistReq.Builder
to create an instance.
//Price history for AMTD for the last week by the minute PriceHistReq request = PriceHistReq.Builder.priceHistReq() .withSymbol("AMTD") .withStartDate(System.currentTimeMillis() - (1000 * 60 * 60 * 24 * 7)) .withFrequencyType(FrequencyType.minute) .withFrequency(1) .build();
-
Nested Class Summary
Nested Classes -
Method Summary
-
Method Details
-
getSymbol
- Returns:
- uppercase symbol of equity, index, forex, option chain, etc. Your account must be explicitly enabled for several of the types.
-
getPeriodType
- Returns:
- The number of periods for which the data is returned. For example, if periodtype=day and period=10, then the request is for 10 days of data
-
getPeriod
- Returns:
- The number of periods for which the data is returned. For example, if periodtype=day and period=10, then the request is for 10 days of data
-
getFrequencyType
- Returns:
- The type of frequency with which a new candle is formed.
-
getFrequency
- Returns:
- The number of the frequencyType to be included in each candle.
-
getStartDate
- Returns:
- The start date of the data being requested (Inclusive). If the startDate is not specified, then it will be (endDate - period) excluding weekends and holidays. If specified, then period and periodType CANNOT be specified.
-
getEndDate
- Returns:
- The end date of the data being requested (Inclusive). If NULL, then the default is the previous business day.
-
getExtendedHours
- Returns:
- Indicates if extended hours data is to be included in the response. FALSE if null. NOTE: Only valid for intraday data requests.
-
toString
-