GetPriceHistoryParams

Struct GetPriceHistoryParams 

Source
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.

API Documentation

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.

Trait Implementations§

Source§

impl Debug for GetPriceHistoryParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GetPriceHistoryParams

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,