pub struct Market { /* private fields */ }Expand description
Market-wide performance statistics backed by configured data providers.
Routes through crate::Capability::MARKET. Unlike crate::finance::sector and
crate::finance::market_summary — Yahoo-only convenience shortcuts — these
honour the configured provider priority.
Created via Providers::market.
Implementations§
Source§impl Market
impl Market
Sourcepub async fn sector_performance(&self) -> Result<Vec<SectorPerformance>>
pub async fn sector_performance(&self) -> Result<Vec<SectorPerformance>>
Aggregate performance for every sector.
Sourcepub async fn sector_performance_history(
&self,
limit: u32,
) -> Result<Vec<SectorPerformanceHistory>>
pub async fn sector_performance_history( &self, limit: u32, ) -> Result<Vec<SectorPerformanceHistory>>
Historical aggregate sector performance, most recent first.
Sourcepub async fn industry_pe(&self) -> Result<Vec<IndustryPe>>
pub async fn industry_pe(&self) -> Result<Vec<IndustryPe>>
Price/earnings ratios by industry.
Sourcepub async fn movers(&self, direction: MoverDirection) -> Result<Vec<MoverQuote>>
pub async fn movers(&self, direction: MoverDirection) -> Result<Vec<MoverQuote>>
Market movers for direction.
Sourcepub async fn gainers(&self) -> Result<Vec<MoverQuote>>
pub async fn gainers(&self) -> Result<Vec<MoverQuote>>
Largest percentage gainers.
Sourcepub async fn losers(&self) -> Result<Vec<MoverQuote>>
pub async fn losers(&self) -> Result<Vec<MoverQuote>>
Largest percentage losers.
Sourcepub async fn most_active(&self) -> Result<Vec<MoverQuote>>
pub async fn most_active(&self) -> Result<Vec<MoverQuote>>
Highest traded volume.
Sourcepub async fn grouped_daily(&self, date: &str) -> Result<Vec<(String, Candle)>>
pub async fn grouped_daily(&self, date: &str) -> Result<Vec<(String, Candle)>>
Fetch grouped daily OHLCV bars for every stock ticker on date
(YYYY-MM-DD) in one call — “give me every ticker’s OHLC for this
date” rather than one symbol at a time.
Routes through Capability::CHART
(the same capability backing per-symbol chart methods) rather than
MARKET, since it’s OHLCV data rather than a performance statistic.
Currently Polygon only. Not cached — one date is one request either way.
Sourcepub async fn crypto_grouped_daily(
&self,
date: &str,
) -> Result<Vec<(String, Candle)>>
pub async fn crypto_grouped_daily( &self, date: &str, ) -> Result<Vec<(String, Candle)>>
Fetch grouped daily OHLCV bars for every crypto ticker on date
(YYYY-MM-DD) in one call. See grouped_daily.
Sourcepub async fn forex_grouped_daily(
&self,
date: &str,
) -> Result<Vec<(String, Candle)>>
pub async fn forex_grouped_daily( &self, date: &str, ) -> Result<Vec<(String, Candle)>>
Fetch grouped daily OHLCV bars for every forex ticker on date
(YYYY-MM-DD) in one call. See grouped_daily.
Sourcepub async fn crypto_trending(&self) -> Result<Vec<TrendingCoin>>
pub async fn crypto_trending(&self) -> Result<Vec<TrendingCoin>>
Fetch coins/nfts/categories trending in the last 24h.
Routes through Capability::CRYPTO.
Currently CoinGecko only.
Sourcepub async fn crypto_global(&self) -> Result<GlobalCryptoStats>
pub async fn crypto_global(&self) -> Result<GlobalCryptoStats>
Fetch aggregate global cryptocurrency market statistics.
Routes through Capability::CRYPTO.
Currently CoinGecko only.
Auto Trait Implementations§
impl !RefUnwindSafe for Market
impl !UnwindSafe for Market
impl Freeze for Market
impl Send for Market
impl Sync for Market
impl Unpin for Market
impl UnsafeUnpin for Market
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
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> ⓘ
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