Struct yahoo_finance_api::YahooConnector
source · pub struct YahooConnector { /* private fields */ }
Expand description
Container for connection parameters to yahoo! finance server
Implementations§
source§impl YahooConnector
impl YahooConnector
sourcepub async fn get_latest_quotes(
&self,
ticker: &str,
interval: &str
) -> Result<YResponse, YahooError>
pub async fn get_latest_quotes( &self, ticker: &str, interval: &str ) -> Result<YResponse, YahooError>
Retrieve the quotes of the last day for the given ticker
sourcepub async fn get_quote_history(
&self,
ticker: &str,
start: OffsetDateTime,
end: OffsetDateTime
) -> Result<YResponse, YahooError>
pub async fn get_quote_history( &self, ticker: &str, start: OffsetDateTime, end: OffsetDateTime ) -> Result<YResponse, YahooError>
Retrieve the quote history for the given ticker form date start to end (inclusive), if available
sourcepub async fn get_quote_range(
&self,
ticker: &str,
interval: &str,
range: &str
) -> Result<YResponse, YahooError>
pub async fn get_quote_range( &self, ticker: &str, interval: &str, range: &str ) -> Result<YResponse, YahooError>
Retrieve quotes for the given ticker for an arbitrary range
sourcepub async fn get_quote_history_interval(
&self,
ticker: &str,
start: OffsetDateTime,
end: OffsetDateTime,
interval: &str
) -> Result<YResponse, YahooError>
pub async fn get_quote_history_interval( &self, ticker: &str, start: OffsetDateTime, end: OffsetDateTime, interval: &str ) -> Result<YResponse, YahooError>
Retrieve the quote history for the given ticker form date start to end (inclusive), if available; specifying the interval of the ticker.
sourcepub async fn search_ticker_opt(
&self,
name: &str
) -> Result<YSearchResultOpt, YahooError>
pub async fn search_ticker_opt( &self, name: &str ) -> Result<YSearchResultOpt, YahooError>
Retrieve the list of quotes found searching a given name
sourcepub async fn search_ticker(
&self,
name: &str
) -> Result<YSearchResult, YahooError>
pub async fn search_ticker( &self, name: &str ) -> Result<YSearchResult, YahooError>
Retrieve the list of quotes found searching a given name
sourcepub async fn search_options(
&self,
name: &str
) -> Result<YOptionResults, YahooError>
pub async fn search_options( &self, name: &str ) -> Result<YOptionResults, YahooError>
Get list for options for a given name
source§impl YahooConnector
impl YahooConnector
sourcepub fn new() -> YahooConnector
pub fn new() -> YahooConnector
Constructor for a new instance of the yahoo connector.
pub fn builder() -> YahooConnectorBuilder
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for YahooConnector
impl Send for YahooConnector
impl Sync for YahooConnector
impl Unpin for YahooConnector
impl !UnwindSafe for YahooConnector
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