pub struct PriceClient { /* private fields */ }Expand description
Price metadata, updates, publisher caps, and streaming API.
Implementations§
Source§impl PriceClient
impl PriceClient
Sourcepub async fn get_price_feeds(
&self,
query_text: Option<&str>,
asset_type: Option<PriceAssetType>,
) -> Result<Vec<PriceFeedMetadata>>
pub async fn get_price_feeds( &self, query_text: Option<&str>, asset_type: Option<PriceAssetType>, ) -> Result<Vec<PriceFeedMetadata>>
Searches price feed metadata.
Sourcepub async fn get_price_feeds_with(
&self,
query_text: Option<&str>,
asset_type: Option<PriceAssetType>,
cancellation: Option<&CancellationToken>,
) -> Result<Vec<PriceFeedMetadata>>
pub async fn get_price_feeds_with( &self, query_text: Option<&str>, asset_type: Option<PriceAssetType>, cancellation: Option<&CancellationToken>, ) -> Result<Vec<PriceFeedMetadata>>
Searches price feed metadata with cancellation.
Sourcepub async fn get_latest_price_updates(
&self,
options: &PriceUpdateOptions,
) -> Result<PriceUpdateResponse>
pub async fn get_latest_price_updates( &self, options: &PriceUpdateOptions, ) -> Result<PriceUpdateResponse>
Gets latest price updates.
Sourcepub async fn get_latest_price_updates_with(
&self,
options: &PriceUpdateOptions,
cancellation: Option<&CancellationToken>,
) -> Result<PriceUpdateResponse>
pub async fn get_latest_price_updates_with( &self, options: &PriceUpdateOptions, cancellation: Option<&CancellationToken>, ) -> Result<PriceUpdateResponse>
Gets latest price updates with cancellation.
Sourcepub async fn get_price_updates_at_timestamp(
&self,
publish_time: impl Display,
options: &PriceUpdateOptions,
) -> Result<PriceUpdateResponse>
pub async fn get_price_updates_at_timestamp( &self, publish_time: impl Display, options: &PriceUpdateOptions, ) -> Result<PriceUpdateResponse>
Gets price updates at a Unix publication time.
Sourcepub async fn get_price_updates_at_timestamp_with(
&self,
publish_time: impl Display,
options: &PriceUpdateOptions,
cancellation: Option<&CancellationToken>,
) -> Result<PriceUpdateResponse>
pub async fn get_price_updates_at_timestamp_with( &self, publish_time: impl Display, options: &PriceUpdateOptions, cancellation: Option<&CancellationToken>, ) -> Result<PriceUpdateResponse>
Gets price updates at a Unix publication time with cancellation.
Sourcepub async fn get_latest_publisher_stake_caps(
&self,
encoding: Option<PriceEncoding>,
parsed: Option<bool>,
) -> Result<PublisherStakeCapsResponse>
pub async fn get_latest_publisher_stake_caps( &self, encoding: Option<PriceEncoding>, parsed: Option<bool>, ) -> Result<PublisherStakeCapsResponse>
Gets latest publisher stake caps.
Sourcepub async fn get_latest_publisher_stake_caps_with(
&self,
encoding: Option<PriceEncoding>,
parsed: Option<bool>,
cancellation: Option<&CancellationToken>,
) -> Result<PublisherStakeCapsResponse>
pub async fn get_latest_publisher_stake_caps_with( &self, encoding: Option<PriceEncoding>, parsed: Option<bool>, cancellation: Option<&CancellationToken>, ) -> Result<PublisherStakeCapsResponse>
Gets latest publisher stake caps with cancellation.
Sourcepub async fn stream_price_updates(
&self,
options: &PriceStreamOptions,
cancellation: Option<CancellationToken>,
) -> Result<PriceStream>
pub async fn stream_price_updates( &self, options: &PriceStreamOptions, cancellation: Option<CancellationToken>, ) -> Result<PriceStream>
Connects to the price server-sent-events stream.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PriceClient
impl !UnwindSafe for PriceClient
impl Freeze for PriceClient
impl Send for PriceClient
impl Sync for PriceClient
impl Unpin for PriceClient
impl UnsafeUnpin for PriceClient
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