pub struct YahooSource { /* private fields */ }Expand description
Yahoo Finance’s chart endpoint (the one yfinance uses) as a DataProvider
for equities, ETFs, indices, FX and crypto: it fetches whatever symbol and
timeframe are asked for.
Yahoo limits how far back the finer intervals reach — minute data only goes
back days — so a range it will not serve comes back empty. Widen it with
range.
let data = YahooSource::new().range("6mo").request("AAPL", "1D".parse()?)?;Implementations§
Trait Implementations§
Source§impl Clone for YahooSource
impl Clone for YahooSource
Source§fn clone(&self) -> YahooSource
fn clone(&self) -> YahooSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DataProvider for YahooSource
impl DataProvider for YahooSource
fn request( &self, symbol: &str, timeframe: Timeframe, ) -> Result<Data, ProviderError>
Source§fn footprint(
&self,
_ticks_per_row: f64,
_va_percent: f64,
_imbalance_percent: f64,
) -> Option<Vec<FootprintRow>>
fn footprint( &self, _ticks_per_row: f64, _va_percent: f64, _imbalance_percent: f64, ) -> Option<Vec<FootprintRow>>
The volume footprint rows for the current bar (
request.footprint),
lowest price first. None — the default — means the host has no order-flow
feed, so the script reads na.Source§fn financial(&self, _symbol: &str, _id: &str, _period: &str) -> Option<f64>
fn financial(&self, _symbol: &str, _id: &str, _period: &str) -> Option<f64>
A fundamental financial metric (
request.financial), e.g. id = "TOTAL_REVENUE", period = "FY"/"FQ". None — the default — means the
host has no such feed, so the script reads na.Source§fn dividends(&self, _ticker: &str, _field: &str) -> Option<f64>
fn dividends(&self, _ticker: &str, _field: &str) -> Option<f64>
A dividend field (
request.dividends), e.g. "gross"/"net".Source§fn earnings(&self, _ticker: &str, _field: &str) -> Option<f64>
fn earnings(&self, _ticker: &str, _field: &str) -> Option<f64>
An earnings field (
request.earnings), e.g. "actual"/"estimate".Source§fn splits(&self, _ticker: &str, _field: &str) -> Option<f64>
fn splits(&self, _ticker: &str, _field: &str) -> Option<f64>
A splits field (
request.splits), e.g. "numerator"/"denominator".Source§impl Debug for YahooSource
impl Debug for YahooSource
Auto Trait Implementations§
impl Freeze for YahooSource
impl RefUnwindSafe for YahooSource
impl Send for YahooSource
impl Sync for YahooSource
impl Unpin for YahooSource
impl UnsafeUnpin for YahooSource
impl UnwindSafe for YahooSource
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