pub struct KalshiInstrumentProvider { /* private fields */ }Expand description
Loads current or archived definitions without serving explicit requests from a private cache.
Request parameters accept the REST market filters, exchange_index, historical, and
max_pages (default 100). An exhausted page budget fails without emitting a partial response.
Time bounds filter ts_event, using local initialization time when updated_time is absent.
They do not reconstruct historical definitions.
Implementations§
Source§impl KalshiInstrumentProvider
impl KalshiInstrumentProvider
Sourcepub fn new(
http: KalshiHttpClient,
clock: &'static AtomicTime,
sender: EventSender<DataEvent>,
) -> Self
pub fn new( http: KalshiHttpClient, clock: &'static AtomicTime, sender: EventSender<DataEvent>, ) -> Self
Creates an instrument request handler using the supplied transport and event sender.
Sourcepub async fn request_instrument(&self, request: RequestInstrument) -> Result<()>
pub async fn request_instrument(&self, request: RequestInstrument) -> Result<()>
Fetches a fresh definition, falling back to the archive only after a live-market 404.
§Errors
Returns an error if identity, filters, admission, transport, or response dispatch fails.
Sourcepub async fn request_instruments(
&self,
request: RequestInstruments,
) -> Result<()>
pub async fn request_instruments( &self, request: RequestInstruments, ) -> Result<()>
Fetches all selected live or archived markets, retaining only supported definitions.
§Errors
Returns an error if the venue or filters are invalid, pagination is incomplete, metadata is malformed, or transport or response dispatch fails.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for KalshiInstrumentProvider
impl !RefUnwindSafe for KalshiInstrumentProvider
impl !UnwindSafe for KalshiInstrumentProvider
impl Send for KalshiInstrumentProvider
impl Sync for KalshiInstrumentProvider
impl Unpin for KalshiInstrumentProvider
impl UnsafeUnpin for KalshiInstrumentProvider
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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> ⓘ
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> ⓘ
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