pub struct GetPriceHistoryRequest { /* private fields */ }Expand description
Get PriceHistory for a single symbol and date ranges.
Implementations§
Source§impl GetPriceHistoryRequest
impl GetPriceHistoryRequest
Sourcepub fn period_type(&mut self, val: PeriodType) -> &mut Self
pub fn period_type(&mut self, val: PeriodType) -> &mut Self
The chart period being requested.
Available values : day, month, year, ytd
Sourcepub fn period(&mut self, val: i64) -> &mut Self
pub fn period(&mut self, val: i64) -> &mut Self
The number of chart period types.
If the Self::period_type is
- day - valid values are 1, 2, 3, 4, 5, 10
- month - valid values are 1, 2, 3, 6
- year - valid values are 1, 2, 3, 5, 10, 15, 20
- ytd - valid values are 1
If the Self::period is not specified and the Self::period_type is
- day - default period is 10.
- month - default period is 1.
- year - default period is 1.
- ytd - default period is 1.
Sourcepub fn frequency_type(&mut self, val: FrequencyType) -> &mut Self
pub fn frequency_type(&mut self, val: FrequencyType) -> &mut Self
The time Self::frequency_type
If the Self::period_type is
day- valid value isminutemonth- valid values aredaily,weeklyyear- valid values aredaily,weekly,monthlyytd- valid values aredaily,weekly
If Self::frequency_type is not specified, default value depends on the Self::period_type
day- defaulted tominute.month- defaulted toweekly.year- defaulted tomonthly.ytd- defaulted toweekly.
Available values : minute, daily, weekly, monthly
Sourcepub fn frequency(&mut self, val: i64) -> &mut Self
pub fn frequency(&mut self, val: i64) -> &mut Self
The time frequency duration
If the Self::frequency_type is
minute- valid values are1,5,10,15,30daily- valid value is1weekly- valid value is1monthly- valid value is1
If Self::frequency is not specified, default value is 1
Sourcepub fn start_date(&mut self, val: DateTime<Utc>) -> &mut Self
pub fn start_date(&mut self, val: DateTime<Utc>) -> &mut Self
If not specified Self::start_date will be (Self::end_date - Self::period) excluding weekends and holidays.
Sourcepub fn end_date(&mut self, val: DateTime<Utc>) -> &mut Self
pub fn end_date(&mut self, val: DateTime<Utc>) -> &mut Self
If not specified, the Self::end_date will default to the market close of previous business day.
Sourcepub fn need_extended_hours_data(&mut self, val: bool) -> &mut Self
pub fn need_extended_hours_data(&mut self, val: bool) -> &mut Self
Need extended hours data
Sourcepub fn need_previous_close(&mut self, val: bool) -> &mut Self
pub fn need_previous_close(&mut self, val: bool) -> &mut Self
Need previous close price/date