Struct eodhistoricaldata_api::EodHistConnector
source · pub struct EodHistConnector { /* private fields */ }
Implementations
sourceimpl EodHistConnector
impl EodHistConnector
sourcepub fn new(token: String) -> EodHistConnector
pub fn new(token: String) -> EodHistConnector
Constructor for a new instance of EodHistConnector. token is the API token you got from eodhistoricaldata
sourcepub async fn get_latest_quote(
&self,
ticker: &str
) -> Result<RealTimeQuote, EodHistDataError>
pub async fn get_latest_quote(
&self,
ticker: &str
) -> Result<RealTimeQuote, EodHistDataError>
Retrieve the latest quote for the given ticker
sourcepub async fn get_quote_history(
&self,
ticker: &str,
start: NaiveDate,
end: NaiveDate
) -> Result<Vec<HistoricQuote>, EodHistDataError>
pub async fn get_quote_history(
&self,
ticker: &str,
start: NaiveDate,
end: NaiveDate
) -> Result<Vec<HistoricQuote>, EodHistDataError>
Retrieve the quote history for the given ticker form date start to end (inklusive), if available
sourcepub async fn get_dividend_history(
&self,
ticker: &str,
start: NaiveDate
) -> Result<Vec<Dividend>, EodHistDataError>
pub async fn get_dividend_history(
&self,
ticker: &str,
start: NaiveDate
) -> Result<Vec<Dividend>, EodHistDataError>
Retrieve the quote history for the given ticker form date start to end (inklusive), if available
Auto Trait Implementations
impl RefUnwindSafe for EodHistConnector
impl Send for EodHistConnector
impl Sync for EodHistConnector
impl Unpin for EodHistConnector
impl UnwindSafe for EodHistConnector
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more