GetPriceHistoryRequest

Struct GetPriceHistoryRequest 

Source
pub struct GetPriceHistoryRequest { /* private fields */ }
Expand description

Get PriceHistory for a single symbol and date ranges.

Implementations§

Source§

impl GetPriceHistoryRequest

Source

pub fn period_type(&mut self, val: PeriodType) -> &mut Self

The chart period being requested.

Available values : day, month, year, ytd

Source

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

pub fn frequency_type(&mut self, val: FrequencyType) -> &mut Self

The time Self::frequency_type

If the Self::period_type is

  • day - valid value is minute
  • month - valid values are daily, weekly
  • year - valid values are daily, weekly, monthly
  • ytd - valid values are daily, weekly

If Self::frequency_type is not specified, default value depends on the Self::period_type

  • day - defaulted to minute.
  • month - defaulted to weekly.
  • year - defaulted to monthly.
  • ytd - defaulted to weekly.

Available values : minute, daily, weekly, monthly

Source

pub fn frequency(&mut self, val: i64) -> &mut Self

The time frequency duration

If the Self::frequency_type is

  • minute - valid values are 1, 5, 10, 15, 30
  • daily - valid value is 1
  • weekly - valid value is 1
  • monthly - valid value is 1

If Self::frequency is not specified, default value is 1

Source

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.

Source

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.

Source

pub fn need_extended_hours_data(&mut self, val: bool) -> &mut Self

Need extended hours data

Source

pub fn need_previous_close(&mut self, val: bool) -> &mut Self

Need previous close price/date

Source

pub async fn send(self) -> Result<CandleList, Error>

Trait Implementations§

Source§

impl Debug for GetPriceHistoryRequest

Source§

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

Formats the value using the given formatter. 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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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