pub struct YahooFinanceClient { /* private fields */ }Expand description
Yahoo Finance client
Implementations§
Source§impl YahooFinanceClient
impl YahooFinanceClient
Sourcepub fn new(config: YahooFinanceConfig) -> Self
pub fn new(config: YahooFinanceConfig) -> Self
Create a new Yahoo Finance client
Sourcepub async fn get_historical(
&self,
symbol: &str,
period1: DateTime<Utc>,
period2: DateTime<Utc>,
interval: &str,
) -> Result<Vec<YahooBar>, YahooFinanceError>
pub async fn get_historical( &self, symbol: &str, period1: DateTime<Utc>, period2: DateTime<Utc>, interval: &str, ) -> Result<Vec<YahooBar>, YahooFinanceError>
Get historical data for a symbol
Sourcepub async fn get_quote(
&self,
symbol: &str,
) -> Result<YahooQuote, YahooFinanceError>
pub async fn get_quote( &self, symbol: &str, ) -> Result<YahooQuote, YahooFinanceError>
Get current quote for a symbol
Auto Trait Implementations§
impl Freeze for YahooFinanceClient
impl !RefUnwindSafe for YahooFinanceClient
impl Send for YahooFinanceClient
impl Sync for YahooFinanceClient
impl Unpin for YahooFinanceClient
impl !UnwindSafe for YahooFinanceClient
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