pub enum QuoteResponse {
Bond(String),
Equity(Box<EquityResponse>),
Forex(ForexResponse),
Future(FutureResponse),
FutureOption(FutureOptionResponse),
Index(IndexResponse),
MutualFund(MutualFundResponse),
Option(Box<OptionResponse>),
}Expand description
a (symbol, QuoteResponse) map. SCHWis an example key
Variants§
Bond(String)
Equity(Box<EquityResponse>)
Forex(ForexResponse)
Future(FutureResponse)
FutureOption(FutureOptionResponse)
Index(IndexResponse)
MutualFund(MutualFundResponse)
Option(Box<OptionResponse>)
Implementations§
Source§impl QuoteResponse
impl QuoteResponse
Sourcepub fn n52week_high(&self) -> Option<f64>
pub fn n52week_high(&self) -> Option<f64>
Returns the 52-week high price
Sourcepub fn n52week_low(&self) -> Option<f64>
pub fn n52week_low(&self) -> Option<f64>
Returns the 52-week low price
Sourcepub fn close_price(&self) -> f64
pub fn close_price(&self) -> f64
Returns the previous day’s closing price
Sourcepub fn high_price(&self) -> Option<f64>
pub fn high_price(&self) -> Option<f64>
Returns the day’s high trade price
Sourcepub fn last_price(&self) -> Option<f64>
pub fn last_price(&self) -> Option<f64>
Returns the latest traded price
Sourcepub fn net_change(&self) -> f64
pub fn net_change(&self) -> f64
Returns the current last-prev close price difference
Sourcepub fn open_price(&self) -> Option<f64>
pub fn open_price(&self) -> Option<f64>
Returns the day’s open trade price
Sourcepub fn quote_time(&self) -> Option<DateTime<Utc>>
pub fn quote_time(&self) -> Option<DateTime<Utc>>
Returns the time of the latest quote in Utc format
Sourcepub fn trade_time(&self) -> DateTime<Utc>
pub fn trade_time(&self) -> DateTime<Utc>
Returns the time of the last trade in Utc format
Sourcepub fn total_volume(&self) -> Option<u64>
pub fn total_volume(&self) -> Option<u64>
Returns the total volume of trades for the day including pre/post market
Trait Implementations§
Source§impl Clone for QuoteResponse
impl Clone for QuoteResponse
Source§fn clone(&self) -> QuoteResponse
fn clone(&self) -> QuoteResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QuoteResponse
impl Debug for QuoteResponse
Source§impl<'de> Deserialize<'de> for QuoteResponse
impl<'de> Deserialize<'de> for QuoteResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QuoteResponse
impl RefUnwindSafe for QuoteResponse
impl Send for QuoteResponse
impl Sync for QuoteResponse
impl Unpin for QuoteResponse
impl UnwindSafe for QuoteResponse
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