pub struct Charts { /* private fields */ }Expand description
Historical price chart API endpoints
Implementations§
Source§impl Charts
impl Charts
Sourcepub async fn get_historical_prices(
&self,
symbol: &str,
from: Option<&str>,
to: Option<&str>,
) -> Result<Vec<HistoricalPrice>>
pub async fn get_historical_prices( &self, symbol: &str, from: Option<&str>, to: Option<&str>, ) -> Result<Vec<HistoricalPrice>>
Get historical daily prices (EOD - End of Day)
Sourcepub async fn get_intraday_prices(
&self,
symbol: &str,
timeframe: Timeframe,
from: Option<&str>,
to: Option<&str>,
) -> Result<Vec<IntradayPrice>>
pub async fn get_intraday_prices( &self, symbol: &str, timeframe: Timeframe, from: Option<&str>, to: Option<&str>, ) -> Result<Vec<IntradayPrice>>
Get intraday prices
Sourcepub async fn get_1min_prices(
&self,
symbol: &str,
from: Option<&str>,
to: Option<&str>,
) -> Result<Vec<IntradayPrice>>
pub async fn get_1min_prices( &self, symbol: &str, from: Option<&str>, to: Option<&str>, ) -> Result<Vec<IntradayPrice>>
Get 1-minute intraday prices
Sourcepub async fn get_5min_prices(
&self,
symbol: &str,
from: Option<&str>,
to: Option<&str>,
) -> Result<Vec<IntradayPrice>>
pub async fn get_5min_prices( &self, symbol: &str, from: Option<&str>, to: Option<&str>, ) -> Result<Vec<IntradayPrice>>
Get 5-minute intraday prices
Sourcepub async fn get_15min_prices(
&self,
symbol: &str,
from: Option<&str>,
to: Option<&str>,
) -> Result<Vec<IntradayPrice>>
pub async fn get_15min_prices( &self, symbol: &str, from: Option<&str>, to: Option<&str>, ) -> Result<Vec<IntradayPrice>>
Get 15-minute intraday prices
Sourcepub async fn get_30min_prices(
&self,
symbol: &str,
from: Option<&str>,
to: Option<&str>,
) -> Result<Vec<IntradayPrice>>
pub async fn get_30min_prices( &self, symbol: &str, from: Option<&str>, to: Option<&str>, ) -> Result<Vec<IntradayPrice>>
Get 30-minute intraday prices
Sourcepub async fn get_1hour_prices(
&self,
symbol: &str,
from: Option<&str>,
to: Option<&str>,
) -> Result<Vec<IntradayPrice>>
pub async fn get_1hour_prices( &self, symbol: &str, from: Option<&str>, to: Option<&str>, ) -> Result<Vec<IntradayPrice>>
Get 1-hour intraday prices
Sourcepub async fn get_4hour_prices(
&self,
symbol: &str,
from: Option<&str>,
to: Option<&str>,
) -> Result<Vec<IntradayPrice>>
pub async fn get_4hour_prices( &self, symbol: &str, from: Option<&str>, to: Option<&str>, ) -> Result<Vec<IntradayPrice>>
Get 4-hour intraday prices
Sourcepub async fn get_historical_dividends(
&self,
symbol: &str,
) -> Result<Vec<HistoricalDividend>>
pub async fn get_historical_dividends( &self, symbol: &str, ) -> Result<Vec<HistoricalDividend>>
Get historical dividend data
§Arguments
symbol- Stock symbol (e.g., “AAPL”)
§Example
let client = FmpClient::new()?;
let dividends = client.charts().get_historical_dividends("AAPL").await?;
for div in dividends.iter().take(5) {
println!("{}: ${:.2} (Adjusted: ${:.2})",
div.date, div.dividend, div.adj_dividend);
}Sourcepub async fn get_stock_splits(&self, symbol: &str) -> Result<Vec<StockSplit>>
pub async fn get_stock_splits(&self, symbol: &str) -> Result<Vec<StockSplit>>
Sourcepub async fn get_survivor_bias_free_eod(
&self,
date: &str,
) -> Result<Vec<HistoricalPrice>>
pub async fn get_survivor_bias_free_eod( &self, date: &str, ) -> Result<Vec<HistoricalPrice>>
Get survivor bias free EOD prices
This includes data for delisted companies, providing a more complete picture of historical market data without survivor bias.
§Arguments
date- Date in YYYY-MM-DD format
§Example
let client = FmpClient::new()?;
let prices = client.charts().get_survivor_bias_free_eod("2024-01-01").await?;
println!("Total symbols on 2024-01-01: {}", prices.len());Auto Trait Implementations§
impl Freeze for Charts
impl !RefUnwindSafe for Charts
impl Send for Charts
impl Sync for Charts
impl Unpin for Charts
impl !UnwindSafe for Charts
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