pub struct StockBarsRequest { /* private fields */ }Expand description
A bounded minute or daily bar request.
Implementations§
Source§impl StockBarsRequest
impl StockBarsRequest
Sourcepub fn new(
symbol: &str,
from: &str,
to: &str,
interval: Interval,
adjustment: PriceAdjustment,
) -> Result<Self>
pub fn new( symbol: &str, from: &str, to: &str, interval: Interval, adjustment: PriceAdjustment, ) -> Result<Self>
Set inclusive date bounds and the adjustment policy. Currently supports
OneMinute and OneDay. Bars are oldest first unless with_sort says otherwise.
Sourcepub fn with_sort(self, order: SortType) -> Self
pub fn with_sort(self, order: SortType) -> Self
Select oldest-first (SortType::Asc) or newest-first order.
Sourcepub fn with_page_size(self, limit: u32) -> Result<Self>
pub fn with_page_size(self, limit: u32) -> Result<Self>
Set the provider page size in 1–50000.
Sourcepub fn interval(&self) -> Interval
pub fn interval(&self) -> Interval
Bar interval: Interval::OneMinute or Interval::OneDay.
Sourcepub fn adjustment(&self) -> PriceAdjustment
pub fn adjustment(&self) -> PriceAdjustment
Requested price adjustment.
Trait Implementations§
Source§impl Clone for StockBarsRequest
impl Clone for StockBarsRequest
Source§impl Debug for StockBarsRequest
impl Debug for StockBarsRequest
Auto Trait Implementations§
impl Freeze for StockBarsRequest
impl RefUnwindSafe for StockBarsRequest
impl Send for StockBarsRequest
impl Sync for StockBarsRequest
impl Unpin for StockBarsRequest
impl UnsafeUnpin for StockBarsRequest
impl UnwindSafe for StockBarsRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more