Quote

Struct Quote 

Source
#[non_exhaustive]
pub struct Quote {
Show 181 fields pub symbol: String, pub logo_url: Option<String>, pub company_logo_url: Option<String>, pub short_name: Option<String>, pub long_name: Option<String>, pub exchange: Option<String>, pub exchange_name: Option<String>, pub quote_type: Option<String>, pub currency: Option<String>, pub currency_symbol: Option<String>, pub underlying_symbol: Option<String>, pub from_currency: Option<String>, pub to_currency: Option<String>, pub regular_market_price: Option<FormattedValue<f64>>, pub regular_market_change: Option<FormattedValue<f64>>, pub regular_market_change_percent: Option<FormattedValue<f64>>, pub regular_market_time: Option<i64>, pub regular_market_day_high: Option<FormattedValue<f64>>, pub regular_market_day_low: Option<FormattedValue<f64>>, pub regular_market_open: Option<FormattedValue<f64>>, pub regular_market_previous_close: Option<FormattedValue<f64>>, pub regular_market_volume: Option<FormattedValue<i64>>, pub market_state: Option<String>, pub day_high: Option<FormattedValue<f64>>, pub day_low: Option<FormattedValue<f64>>, pub open: Option<FormattedValue<f64>>, pub previous_close: Option<FormattedValue<f64>>, pub volume: Option<FormattedValue<i64>>, pub all_time_high: Option<FormattedValue<f64>>, pub all_time_low: Option<FormattedValue<f64>>, pub pre_market_price: Option<FormattedValue<f64>>, pub pre_market_change: Option<FormattedValue<f64>>, pub pre_market_change_percent: Option<FormattedValue<f64>>, pub pre_market_time: Option<i64>, pub post_market_price: Option<FormattedValue<f64>>, pub post_market_change: Option<FormattedValue<f64>>, pub post_market_change_percent: Option<FormattedValue<f64>>, pub post_market_time: Option<i64>, pub average_daily_volume10_day: Option<FormattedValue<i64>>, pub average_daily_volume3_month: Option<FormattedValue<i64>>, pub average_volume: Option<FormattedValue<i64>>, pub average_volume10days: Option<FormattedValue<i64>>, pub market_cap: Option<FormattedValue<i64>>, pub enterprise_value: Option<FormattedValue<i64>>, pub enterprise_to_revenue: Option<FormattedValue<f64>>, pub enterprise_to_ebitda: Option<FormattedValue<f64>>, pub price_to_book: Option<FormattedValue<f64>>, pub price_to_sales_trailing12_months: Option<FormattedValue<f64>>, pub forward_pe: Option<FormattedValue<f64>>, pub trailing_pe: Option<FormattedValue<f64>>, pub beta: Option<FormattedValue<f64>>, pub fifty_two_week_high: Option<FormattedValue<f64>>, pub fifty_two_week_low: Option<FormattedValue<f64>>, pub fifty_day_average: Option<FormattedValue<f64>>, pub two_hundred_day_average: Option<FormattedValue<f64>>, pub week_52_change: Option<FormattedValue<f64>>, pub sand_p_52_week_change: Option<FormattedValue<f64>>, pub dividend_rate: Option<FormattedValue<f64>>, pub dividend_yield: Option<FormattedValue<f64>>, pub trailing_annual_dividend_rate: Option<FormattedValue<f64>>, pub trailing_annual_dividend_yield: Option<FormattedValue<f64>>, pub five_year_avg_dividend_yield: Option<FormattedValue<f64>>, pub ex_dividend_date: Option<FormattedValue<i64>>, pub payout_ratio: Option<FormattedValue<f64>>, pub last_dividend_value: Option<FormattedValue<f64>>, pub last_dividend_date: Option<FormattedValue<i64>>, pub bid: Option<FormattedValue<f64>>, pub bid_size: Option<FormattedValue<i64>>, pub ask: Option<FormattedValue<f64>>, pub ask_size: Option<FormattedValue<i64>>, pub shares_outstanding: Option<FormattedValue<i64>>, pub float_shares: Option<FormattedValue<i64>>, pub implied_shares_outstanding: Option<FormattedValue<i64>>, pub held_percent_insiders: Option<FormattedValue<f64>>, pub held_percent_institutions: Option<FormattedValue<f64>>, pub shares_short: Option<FormattedValue<i64>>, pub shares_short_prior_month: Option<FormattedValue<i64>>, pub short_ratio: Option<FormattedValue<f64>>, pub short_percent_of_float: Option<FormattedValue<f64>>, pub shares_percent_shares_out: Option<FormattedValue<f64>>, pub date_short_interest: Option<FormattedValue<i64>>, pub current_price: Option<FormattedValue<f64>>, pub target_high_price: Option<FormattedValue<f64>>, pub target_low_price: Option<FormattedValue<f64>>, pub target_mean_price: Option<FormattedValue<f64>>, pub target_median_price: Option<FormattedValue<f64>>, pub recommendation_mean: Option<FormattedValue<f64>>, pub recommendation_key: Option<String>, pub number_of_analyst_opinions: Option<FormattedValue<i64>>, pub total_cash: Option<FormattedValue<i64>>, pub total_cash_per_share: Option<FormattedValue<f64>>, pub ebitda: Option<FormattedValue<i64>>, pub total_debt: Option<FormattedValue<i64>>, pub total_revenue: Option<FormattedValue<i64>>, pub net_income_to_common: Option<FormattedValue<i64>>, pub debt_to_equity: Option<FormattedValue<f64>>, pub revenue_per_share: Option<FormattedValue<f64>>, pub return_on_assets: Option<FormattedValue<f64>>, pub return_on_equity: Option<FormattedValue<f64>>, pub free_cashflow: Option<FormattedValue<i64>>, pub operating_cashflow: Option<FormattedValue<i64>>, pub profit_margins: Option<FormattedValue<f64>>, pub gross_margins: Option<FormattedValue<f64>>, pub ebitda_margins: Option<FormattedValue<f64>>, pub operating_margins: Option<FormattedValue<f64>>, pub gross_profits: Option<FormattedValue<i64>>, pub earnings_growth: Option<FormattedValue<f64>>, pub revenue_growth: Option<FormattedValue<f64>>, pub earnings_quarterly_growth: Option<FormattedValue<f64>>, pub current_ratio: Option<FormattedValue<f64>>, pub quick_ratio: Option<FormattedValue<f64>>, pub trailing_eps: Option<FormattedValue<f64>>, pub forward_eps: Option<FormattedValue<f64>>, pub book_value: Option<FormattedValue<f64>>, pub sector: Option<String>, pub sector_key: Option<String>, pub sector_disp: Option<String>, pub industry: Option<String>, pub industry_key: Option<String>, pub industry_disp: Option<String>, pub long_business_summary: Option<String>, pub website: Option<String>, pub ir_website: Option<String>, pub address1: Option<String>, pub city: Option<String>, pub state: Option<String>, pub zip: Option<String>, pub country: Option<String>, pub phone: Option<String>, pub full_time_employees: Option<i64>, pub category: Option<String>, pub fund_family: Option<String>, pub audit_risk: Option<i32>, pub board_risk: Option<i32>, pub compensation_risk: Option<i32>, pub shareholder_rights_risk: Option<i32>, pub overall_risk: Option<i32>, pub time_zone_full_name: Option<String>, pub time_zone_short_name: Option<String>, pub gmt_off_set_milliseconds: Option<i64>, pub first_trade_date_epoch_utc: Option<i64>, pub message_board_id: Option<String>, pub exchange_data_delayed_by: Option<i32>, pub nav_price: Option<FormattedValue<f64>>, pub total_assets: Option<FormattedValue<i64>>, pub yield_value: Option<FormattedValue<f64>>, pub last_split_factor: Option<String>, pub last_split_date: Option<FormattedValue<i64>>, pub last_fiscal_year_end: Option<FormattedValue<i64>>, pub next_fiscal_year_end: Option<FormattedValue<i64>>, pub most_recent_quarter: Option<FormattedValue<i64>>, pub price_hint: Option<FormattedValue<i64>>, pub tradeable: Option<bool>, pub financial_currency: Option<String>, pub company_officers: Option<Vec<CompanyOfficer>>, pub earnings: Option<Earnings>, pub calendar_events: Option<CalendarEvents>, pub recommendation_trend: Option<RecommendationTrend>, pub upgrade_downgrade_history: Option<UpgradeDowngradeHistory>, pub earnings_history: Option<EarningsHistory>, pub earnings_trend: Option<EarningsTrend>, pub insider_holders: Option<InsiderHolders>, pub insider_transactions: Option<InsiderTransactions>, pub institution_ownership: Option<InstitutionOwnership>, pub fund_ownership: Option<FundOwnership>, pub major_holders_breakdown: Option<MajorHoldersBreakdown>, pub net_share_purchase_activity: Option<NetSharePurchaseActivity>, pub sec_filings: Option<SecFilings>, pub balance_sheet_history: Option<BalanceSheetHistory>, pub balance_sheet_history_quarterly: Option<BalanceSheetHistoryQuarterly>, pub cashflow_statement_history: Option<CashflowStatementHistory>, pub cashflow_statement_history_quarterly: Option<CashflowStatementHistoryQuarterly>, pub income_statement_history: Option<IncomeStatementHistory>, pub income_statement_history_quarterly: Option<IncomeStatementHistoryQuarterly>, pub equity_performance: Option<EquityPerformance>, pub index_trend: Option<IndexTrend>, pub industry_trend: Option<IndustryTrend>, pub sector_trend: Option<SectorTrend>, pub fund_profile: Option<FundProfile>, pub fund_performance: Option<FundPerformance>, pub top_holdings: Option<TopHoldings>,
}
Expand description

Flattened quote data with deduplicated fields

This is the primary data structure for stock quotes. It flattens scalar fields from multiple Yahoo Finance modules while preserving complex nested objects.

§Creating Quote Instances

Quote instances can only be obtained through the Ticker API:

let ticker = Ticker::new("AAPL").await?;
let quote = ticker.quote(true).await?;  // include_logo = true
println!("Price: {:?}", quote.regular_market_price);

Note: This struct is marked #[non_exhaustive] and cannot be constructed manually. Use Ticker::quote() or AsyncTicker::quote() instead.

§Field Precedence

For duplicate fields across Yahoo Finance modules:

  • Price → SummaryDetail → DefaultKeyStatistics → FinancialData → AssetProfile

All fields are optional since Yahoo Finance may not return all data for every symbol.

§DataFrame Conversion

With the dataframe feature enabled, call .to_dataframe() to convert to a polars DataFrame:

let df = quote.to_dataframe()?;

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§symbol: String

Stock symbol

§logo_url: Option<String>

Company logo URL (50x50px)

§company_logo_url: Option<String>

Alternative company logo URL (50x50px)

§short_name: Option<String>

Short name of the security

§long_name: Option<String>

Long name of the security

§exchange: Option<String>

Exchange code (e.g., “NMS” for NASDAQ)

§exchange_name: Option<String>

Exchange name (e.g., “NasdaqGS”)

§quote_type: Option<String>

Quote type (e.g., “EQUITY”, “ETF”, “MUTUALFUND”)

§currency: Option<String>

Currency code (e.g., “USD”)

§currency_symbol: Option<String>

Currency symbol (e.g., “$”)

§underlying_symbol: Option<String>

Underlying symbol (for derivatives/options)

§from_currency: Option<String>

From currency (for forex pairs)

§to_currency: Option<String>

To currency (for forex pairs)

§regular_market_price: Option<FormattedValue<f64>>

Current regular market price

§regular_market_change: Option<FormattedValue<f64>>

Regular market change value

§regular_market_change_percent: Option<FormattedValue<f64>>

Regular market change percentage

§regular_market_time: Option<i64>

Regular market time as Unix timestamp

§regular_market_day_high: Option<FormattedValue<f64>>

Regular market day high

§regular_market_day_low: Option<FormattedValue<f64>>

Regular market day low

§regular_market_open: Option<FormattedValue<f64>>

Regular market open price

§regular_market_previous_close: Option<FormattedValue<f64>>

Regular market previous close

§regular_market_volume: Option<FormattedValue<i64>>

Regular market volume

§market_state: Option<String>

Current market state (e.g., “REGULAR”, “POST”, “PRE”)

§day_high: Option<FormattedValue<f64>>

Day’s high price

§day_low: Option<FormattedValue<f64>>

Day’s low price

§open: Option<FormattedValue<f64>>

Opening price

§previous_close: Option<FormattedValue<f64>>

Previous close price

§volume: Option<FormattedValue<i64>>

Trading volume

§all_time_high: Option<FormattedValue<f64>>

All-time high price

§all_time_low: Option<FormattedValue<f64>>

All-time low price

§pre_market_price: Option<FormattedValue<f64>>

Pre-market price

§pre_market_change: Option<FormattedValue<f64>>

Pre-market change value

§pre_market_change_percent: Option<FormattedValue<f64>>

Pre-market change percentage

§pre_market_time: Option<i64>

Pre-market time as Unix timestamp

§post_market_price: Option<FormattedValue<f64>>

Post-market price

§post_market_change: Option<FormattedValue<f64>>

Post-market change value

§post_market_change_percent: Option<FormattedValue<f64>>

Post-market change percentage

§post_market_time: Option<i64>

Post-market time as Unix timestamp

§average_daily_volume10_day: Option<FormattedValue<i64>>

Average daily volume over 10 days

§average_daily_volume3_month: Option<FormattedValue<i64>>

Average daily volume over 3 months

§average_volume: Option<FormattedValue<i64>>

Average trading volume

§average_volume10days: Option<FormattedValue<i64>>

Average trading volume (10 days)

§market_cap: Option<FormattedValue<i64>>

Market capitalization

§enterprise_value: Option<FormattedValue<i64>>

Total enterprise value

§enterprise_to_revenue: Option<FormattedValue<f64>>

Enterprise value to revenue ratio

§enterprise_to_ebitda: Option<FormattedValue<f64>>

Enterprise value to EBITDA ratio

§price_to_book: Option<FormattedValue<f64>>

Price to book value ratio

§price_to_sales_trailing12_months: Option<FormattedValue<f64>>

Price to sales ratio (trailing 12 months)

§forward_pe: Option<FormattedValue<f64>>

Forward price-to-earnings ratio

§trailing_pe: Option<FormattedValue<f64>>

Trailing price-to-earnings ratio

§beta: Option<FormattedValue<f64>>

Beta coefficient (volatility vs market)

§fifty_two_week_high: Option<FormattedValue<f64>>

52-week high price

§fifty_two_week_low: Option<FormattedValue<f64>>

52-week low price

§fifty_day_average: Option<FormattedValue<f64>>

50-day moving average

§two_hundred_day_average: Option<FormattedValue<f64>>

200-day moving average

§week_52_change: Option<FormattedValue<f64>>

52-week price change percentage

§sand_p_52_week_change: Option<FormattedValue<f64>>

S&P 500 52-week change percentage

§dividend_rate: Option<FormattedValue<f64>>

Annual dividend rate

§dividend_yield: Option<FormattedValue<f64>>

Dividend yield percentage

§trailing_annual_dividend_rate: Option<FormattedValue<f64>>

Trailing annual dividend rate

§trailing_annual_dividend_yield: Option<FormattedValue<f64>>

Trailing annual dividend yield

§five_year_avg_dividend_yield: Option<FormattedValue<f64>>

5-year average dividend yield

§ex_dividend_date: Option<FormattedValue<i64>>

Ex-dividend date

§payout_ratio: Option<FormattedValue<f64>>

Dividend payout ratio

§last_dividend_value: Option<FormattedValue<f64>>

Last dividend value

§last_dividend_date: Option<FormattedValue<i64>>

Last dividend date

§bid: Option<FormattedValue<f64>>

Current bid price

§bid_size: Option<FormattedValue<i64>>

Bid size (shares)

§ask: Option<FormattedValue<f64>>

Current ask price

§ask_size: Option<FormattedValue<i64>>

Ask size (shares)

§shares_outstanding: Option<FormattedValue<i64>>

Number of shares outstanding

§float_shares: Option<FormattedValue<i64>>

Number of floating shares

§implied_shares_outstanding: Option<FormattedValue<i64>>

Implied shares outstanding

§held_percent_insiders: Option<FormattedValue<f64>>

Percentage of shares held by insiders

§held_percent_institutions: Option<FormattedValue<f64>>

Percentage of shares held by institutions

§shares_short: Option<FormattedValue<i64>>

Number of shares short

§shares_short_prior_month: Option<FormattedValue<i64>>

Number of shares short (prior month)

§short_ratio: Option<FormattedValue<f64>>

Short ratio (days to cover)

§short_percent_of_float: Option<FormattedValue<f64>>

Short interest as percentage of float

§shares_percent_shares_out: Option<FormattedValue<f64>>

Short interest as percentage of shares outstanding

§date_short_interest: Option<FormattedValue<i64>>

Date of short interest data

§current_price: Option<FormattedValue<f64>>

Current stock price (from financial data)

§target_high_price: Option<FormattedValue<f64>>

Highest analyst price target

§target_low_price: Option<FormattedValue<f64>>

Lowest analyst price target

§target_mean_price: Option<FormattedValue<f64>>

Mean analyst price target

§target_median_price: Option<FormattedValue<f64>>

Median analyst price target

§recommendation_mean: Option<FormattedValue<f64>>

Mean analyst recommendation (1.0 = strong buy, 5.0 = sell)

§recommendation_key: Option<String>

Recommendation key (e.g., “buy”, “hold”, “sell”)

§number_of_analyst_opinions: Option<FormattedValue<i64>>

Number of analyst opinions

§total_cash: Option<FormattedValue<i64>>

Total cash and cash equivalents

§total_cash_per_share: Option<FormattedValue<f64>>

Total cash per share

§ebitda: Option<FormattedValue<i64>>

EBITDA (Earnings Before Interest, Taxes, Depreciation, and Amortization)

§total_debt: Option<FormattedValue<i64>>

Total debt

§total_revenue: Option<FormattedValue<i64>>

Total revenue

§net_income_to_common: Option<FormattedValue<i64>>

Net income to common shareholders

§debt_to_equity: Option<FormattedValue<f64>>

Debt to equity ratio

§revenue_per_share: Option<FormattedValue<f64>>

Revenue per share

§return_on_assets: Option<FormattedValue<f64>>

Return on assets (ROA)

§return_on_equity: Option<FormattedValue<f64>>

Return on equity (ROE)

§free_cashflow: Option<FormattedValue<i64>>

Free cash flow

§operating_cashflow: Option<FormattedValue<i64>>

Operating cash flow

§profit_margins: Option<FormattedValue<f64>>

Profit margins

§gross_margins: Option<FormattedValue<f64>>

Gross profit margins

§ebitda_margins: Option<FormattedValue<f64>>

EBITDA margins

§operating_margins: Option<FormattedValue<f64>>

Operating margins

§gross_profits: Option<FormattedValue<i64>>

Total gross profits

§earnings_growth: Option<FormattedValue<f64>>

Earnings growth rate

§revenue_growth: Option<FormattedValue<f64>>

Revenue growth rate

§earnings_quarterly_growth: Option<FormattedValue<f64>>

Quarterly earnings growth rate

§current_ratio: Option<FormattedValue<f64>>

Current ratio (current assets / current liabilities)

§quick_ratio: Option<FormattedValue<f64>>

Quick ratio (quick assets / current liabilities)

§trailing_eps: Option<FormattedValue<f64>>

Trailing earnings per share

§forward_eps: Option<FormattedValue<f64>>

Forward earnings per share

§book_value: Option<FormattedValue<f64>>

Book value per share

§sector: Option<String>

Sector

§sector_key: Option<String>

Sector key (machine-readable)

§sector_disp: Option<String>

Sector display name

§industry: Option<String>

Industry

§industry_key: Option<String>

Industry key (machine-readable)

§industry_disp: Option<String>

Industry display name

§long_business_summary: Option<String>

Long business summary

§website: Option<String>

Company website

§ir_website: Option<String>

Investor relations website

§address1: Option<String>

Street address line 1

§city: Option<String>

City

§state: Option<String>

State or province

§zip: Option<String>

Postal/ZIP code

§country: Option<String>

Country

§phone: Option<String>

Phone number

§full_time_employees: Option<i64>

Number of full-time employees

§category: Option<String>

Fund category (for mutual funds/ETFs)

§fund_family: Option<String>

Fund family name

§audit_risk: Option<i32>

Audit risk score

§board_risk: Option<i32>

Board risk score

§compensation_risk: Option<i32>

Compensation risk score

§shareholder_rights_risk: Option<i32>

Shareholder rights risk score

§overall_risk: Option<i32>

Overall risk score

§time_zone_full_name: Option<String>

Full timezone name

§time_zone_short_name: Option<String>

Short timezone name

§gmt_off_set_milliseconds: Option<i64>

GMT offset in milliseconds

§first_trade_date_epoch_utc: Option<i64>

First trade date (Unix epoch UTC)

§message_board_id: Option<String>

Message board ID

§exchange_data_delayed_by: Option<i32>

Exchange data delay in seconds

§nav_price: Option<FormattedValue<f64>>

Net asset value price (for funds)

§total_assets: Option<FormattedValue<i64>>

Total assets (for funds)

§yield_value: Option<FormattedValue<f64>>

Yield (for bonds/funds)

§last_split_factor: Option<String>

Last stock split factor

§last_split_date: Option<FormattedValue<i64>>

Last stock split date

§last_fiscal_year_end: Option<FormattedValue<i64>>

Last fiscal year end date

§next_fiscal_year_end: Option<FormattedValue<i64>>

Next fiscal year end date

§most_recent_quarter: Option<FormattedValue<i64>>

Most recent quarter date

§price_hint: Option<FormattedValue<i64>>

Price hint for decimal places

§tradeable: Option<bool>

Whether the security is tradeable

§financial_currency: Option<String>

Currency code for financial data

§company_officers: Option<Vec<CompanyOfficer>>

Company officers (executives and compensation)

§earnings: Option<Earnings>

Earnings data (quarterly earnings vs estimates, revenue/earnings history)

§calendar_events: Option<CalendarEvents>

Calendar events (upcoming earnings dates, dividend dates)

§recommendation_trend: Option<RecommendationTrend>

Analyst recommendation trends over time

§upgrade_downgrade_history: Option<UpgradeDowngradeHistory>

Analyst upgrades/downgrades history

§earnings_history: Option<EarningsHistory>

Historical earnings data (actual vs estimate)

§earnings_trend: Option<EarningsTrend>

Earnings trend data (estimates and revisions)

§insider_holders: Option<InsiderHolders>

Insider stock holdings

§insider_transactions: Option<InsiderTransactions>

Insider transactions

§institution_ownership: Option<InstitutionOwnership>

Top institutional owners

§fund_ownership: Option<FundOwnership>

Top fund owners

§major_holders_breakdown: Option<MajorHoldersBreakdown>

Major holders breakdown (insiders, institutions, etc.)

§net_share_purchase_activity: Option<NetSharePurchaseActivity>

Net share purchase activity by insiders

§sec_filings: Option<SecFilings>

SEC filings

§balance_sheet_history: Option<BalanceSheetHistory>

Balance sheet history (annual)

§balance_sheet_history_quarterly: Option<BalanceSheetHistoryQuarterly>

Balance sheet history (quarterly)

§cashflow_statement_history: Option<CashflowStatementHistory>

Cash flow statement history (annual)

§cashflow_statement_history_quarterly: Option<CashflowStatementHistoryQuarterly>

Cash flow statement history (quarterly)

§income_statement_history: Option<IncomeStatementHistory>

Income statement history (annual)

§income_statement_history_quarterly: Option<IncomeStatementHistoryQuarterly>

Income statement history (quarterly)

§equity_performance: Option<EquityPerformance>

Equity performance (returns vs benchmark across multiple time periods)

§index_trend: Option<IndexTrend>

Index trend (PE and PEG ratios)

§industry_trend: Option<IndustryTrend>

Industry trend

§sector_trend: Option<SectorTrend>

Sector trend

§fund_profile: Option<FundProfile>

Fund profile (for ETFs and mutual funds)

§fund_performance: Option<FundPerformance>

Fund performance data (for ETFs and mutual funds)

§top_holdings: Option<TopHoldings>

Top holdings and sector weightings (for ETFs and mutual funds)

Implementations§

Source§

impl Quote

Source

pub fn to_dataframe(&self) -> PolarsResult<DataFrame>

Converts this struct to a single-row polars DataFrame.

All scalar fields are included as columns. Nested objects and complex types are excluded.

This method is auto-generated by the ToDataFrame derive macro.

Source

pub fn vec_to_dataframe(items: &[Self]) -> PolarsResult<DataFrame>

Converts a slice of structs to a multi-row polars DataFrame.

All scalar fields are included as columns. Nested objects and complex types are excluded.

This method is auto-generated by the ToDataFrame derive macro.

Source§

impl Quote

Source

pub fn live_price(&self) -> Option<f64>

Returns the most relevant current price based on market state

Returns post-market price if in post-market, pre-market price if in pre-market, otherwise regular market price.

Source

pub fn day_range(&self) -> Option<(f64, f64)>

Returns the day’s trading range as (low, high)

Source

pub fn week_52_range(&self) -> Option<(f64, f64)>

Returns the 52-week range as (low, high)

Source

pub fn is_market_open(&self) -> bool

Returns whether the market is currently open

Source

pub fn is_pre_market(&self) -> bool

Returns whether this is in pre-market trading

Source

pub fn is_post_market(&self) -> bool

Returns whether this is in post-market trading

Trait Implementations§

Source§

impl Clone for Quote

Source§

fn clone(&self) -> Quote

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Quote

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Quote

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Quote

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Quote

§

impl RefUnwindSafe for Quote

§

impl Send for Quote

§

impl Sync for Quote

§

impl Unpin for Quote

§

impl UnwindSafe for Quote

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Key for T
where T: Clone,

Source§

fn align() -> usize

The alignment necessary for the key. Must return a power of two.
Source§

fn size(&self) -> usize

The size of the key in bytes.
Source§

unsafe fn init(&self, ptr: *mut u8)

Initialize the key in the given memory location. Read more
Source§

unsafe fn get<'a>(ptr: *const u8) -> &'a T

Get a reference to the key from the given memory location. Read more
Source§

unsafe fn drop_in_place(ptr: *mut u8)

Drop the key in place. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> PlanCallbackArgs for T

Source§

impl<T> PlanCallbackOut for T