[][src]Crate yahoo_finance

Yahoo Finance

Yahoo! provides some great market data and this is a library to easily get that information out of Yahoo for use in financial applications.

Currently yahoo_finance provides:

  • Historical quote information OHCL Data + volume

Quick Example

To retrieve the intraday high for the last 3 months of Apple you can use something like:

use yahoo_finance::{history, Interval};
 
// retrieve 6 months worth of data
let data = history::retrieve_interval("AAPL", Interval::_6mo).unwrap();
 
// print out some high numbers!
for bar in &data {
   println!("Apple hit an intraday high of ${:.2} on {}.",
     bar.high, bar.timestamp.format("%b %e %Y")
   )
}

Modules

history

Historical quote information

Structs

Bar

A single 'bar' of price information containing OHLCV data

Enums

Error

All possible errors that can occur when using yahoo finance

Interval

An interval use when requesting periods of quote information.