pub struct GetPriceHistoryParams {
pub end_date: Option<String>,
pub frequency_type: Option<String>,
pub frequency: Option<String>,
pub need_extended_hours_data: Option<bool>,
pub period_type: Option<String>,
pub period: Option<String>,
pub start_date: Option<String>,
}Expand description
Parameters for the get_price_history() method.
Fields§
§end_date: Option<String>End date as milliseconds since epoch. If startDate and endDate are provided, period should not be provided. Default is previous trading day.
frequency_type: Option<String>The type of frequency with which a new candle is formed.
Valid frequencyTypes by periodType (defaults marked with an asterisk):
day: minute*
month: daily, weekly*
year: daily, weekly, monthly*
ytd: daily, weekly*
frequency: Option<String>The number of the frequencyType to be included in each candle.
Valid frequencies by frequencyType (defaults marked with an asterisk):
minute: 1*, 5, 10, 15, 30
daily: 1*
weekly: 1*
monthly: 1*
need_extended_hours_data: Option<bool>true to return extended hours data, false for regular market hours
only. Default is true
period_type: Option<String>The type of period to show. Valid values are day, month, year, or
ytd (year to date). Default is day.
period: Option<String>The number of periods to show.
Example: For a 2 day / 1 min chart, the values would be:
period: 2
periodType: day
frequency: 1
frequencyType: min
Valid periods by periodType (defaults marked with an asterisk):
day: 1, 2, 3, 4, 5, 10*
month: 1*, 2, 3, 6
year: 1*, 2, 3, 5, 10, 15, 20
ytd: 1*
start_date: Option<String>Start date as milliseconds since epoch. If startDate and endDate are provided, period should not be provided.