pub struct CalendarContext(/* private fields */);Expand description
Financial calendar context — earnings, dividends, splits, IPOs, macro data.
Implementations§
Source§impl CalendarContext
impl CalendarContext
Sourcepub fn new(config: Arc<Config>) -> Self
pub fn new(config: Arc<Config>) -> Self
Create a CalendarContext
Sourcepub async fn finance_calendar(
&self,
category: CalendarCategory,
start: impl Into<String>,
end: impl Into<String>,
market: Option<String>,
count: Option<i32>,
offset: Option<i32>,
next: Option<CalendarPageDirection>,
) -> Result<CalendarEventsResponse>
pub async fn finance_calendar( &self, category: CalendarCategory, start: impl Into<String>, end: impl Into<String>, market: Option<String>, count: Option<i32>, offset: Option<i32>, next: Option<CalendarPageDirection>, ) -> Result<CalendarEventsResponse>
Get financial calendar events.
The endpoint is paginated. The server caps each response (it
historically returns at most 10 events per page unless a larger
count is requested) and reports a next_date cursor. To page
through the full window, either request a larger count, or re-call
this method passing the returned next_date as start until
next_date comes back empty.
count— maximum number of events per page (server default whenNone).offset— number of events to skip from the start of the window.next— direction to page from the cursor (seeCalendarPageDirection).
Path: GET /v1/quote/finance_calendar
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CalendarContext
impl !UnwindSafe for CalendarContext
impl Freeze for CalendarContext
impl Send for CalendarContext
impl Sync for CalendarContext
impl Unpin for CalendarContext
impl UnsafeUnpin for CalendarContext
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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