pub struct Financials { /* private fields */ }Expand description
Financial statements API endpoints
Implementations§
Source§impl Financials
impl Financials
Sourcepub async fn get_income_statement(
&self,
symbol: &str,
period: Period,
limit: Option<u32>,
) -> Result<Vec<IncomeStatement>>
pub async fn get_income_statement( &self, symbol: &str, period: Period, limit: Option<u32>, ) -> Result<Vec<IncomeStatement>>
Get income statements
Sourcepub async fn get_balance_sheet(
&self,
symbol: &str,
period: Period,
limit: Option<u32>,
) -> Result<Vec<BalanceSheet>>
pub async fn get_balance_sheet( &self, symbol: &str, period: Period, limit: Option<u32>, ) -> Result<Vec<BalanceSheet>>
Get balance sheet
Sourcepub async fn get_cash_flow_statement(
&self,
symbol: &str,
period: Period,
limit: Option<u32>,
) -> Result<Vec<CashFlowStatement>>
pub async fn get_cash_flow_statement( &self, symbol: &str, period: Period, limit: Option<u32>, ) -> Result<Vec<CashFlowStatement>>
Get cash flow statement
Sourcepub async fn get_ratios(
&self,
symbol: &str,
period: Period,
limit: Option<u32>,
) -> Result<Vec<FinancialRatios>>
pub async fn get_ratios( &self, symbol: &str, period: Period, limit: Option<u32>, ) -> Result<Vec<FinancialRatios>>
Get financial ratios
Sourcepub async fn get_key_metrics(
&self,
symbol: &str,
period: Period,
limit: Option<u32>,
) -> Result<Vec<KeyMetrics>>
pub async fn get_key_metrics( &self, symbol: &str, period: Period, limit: Option<u32>, ) -> Result<Vec<KeyMetrics>>
Get key metrics
Sourcepub async fn get_key_metrics_ttm(&self, symbol: &str) -> Result<Vec<KeyMetrics>>
pub async fn get_key_metrics_ttm(&self, symbol: &str) -> Result<Vec<KeyMetrics>>
Get key metrics TTM (Trailing Twelve Months)
Sourcepub async fn get_ratios_ttm(&self, symbol: &str) -> Result<Vec<FinancialRatios>>
pub async fn get_ratios_ttm(&self, symbol: &str) -> Result<Vec<FinancialRatios>>
Get financial ratios TTM (Trailing Twelve Months)
Sourcepub async fn get_financial_growth(
&self,
symbol: &str,
period: Period,
limit: Option<u32>,
) -> Result<Vec<FinancialGrowth>>
pub async fn get_financial_growth( &self, symbol: &str, period: Period, limit: Option<u32>, ) -> Result<Vec<FinancialGrowth>>
Get financial growth metrics
Returns year-over-year and multi-year growth rates for key financial metrics.
§Arguments
symbol- Stock symbol (e.g., “AAPL”)period- Period (Annual or Quarter)limit- Number of results (optional)
§Example
let client = FmpClient::new()?;
let growth = client.financials().get_financial_growth("AAPL", Period::Annual, Some(5)).await?;
for g in growth {
println!("{}: Revenue growth: {:.2}%, Net income growth: {:.2}%",
g.date, g.revenue_growth * 100.0, g.net_income_growth * 100.0);
}Sourcepub async fn get_financial_as_reported(
&self,
symbol: &str,
period: Period,
limit: Option<u32>,
) -> Result<Vec<FinancialAsReported>>
pub async fn get_financial_as_reported( &self, symbol: &str, period: Period, limit: Option<u32>, ) -> Result<Vec<FinancialAsReported>>
Get financial statement as reported (XBRL data)
Returns financial statements as reported to the SEC with XBRL tags.
§Arguments
symbol- Stock symbol (e.g., “AAPL”)period- Period (Annual or Quarter)limit- Number of results (optional)
§Example
let client = FmpClient::new()?;
let reported = client.financials().get_financial_as_reported("AAPL", Period::Annual, Some(1)).await?;
for statement in reported {
println!("{}: {} fields reported", statement.date, statement.data.len());
}Sourcepub async fn get_revenue_product_segmentation(
&self,
symbol: &str,
period: Period,
structure: Option<&str>,
) -> Result<Vec<RevenueProductSegmentation>>
pub async fn get_revenue_product_segmentation( &self, symbol: &str, period: Period, structure: Option<&str>, ) -> Result<Vec<RevenueProductSegmentation>>
Get revenue product segmentation
Returns revenue breakdown by product or service line.
§Arguments
symbol- Stock symbol (e.g., “AAPL”)period- Period (Annual or Quarter)structure- “flat” for simple structure (optional)
§Example
let client = FmpClient::new()?;
let segments = client.financials().get_revenue_product_segmentation("AAPL", Period::Annual, None).await?;
for seg in segments {
println!("{}: {} product segments", seg.date, seg.segments.len());
}Sourcepub async fn get_revenue_geographic_segmentation(
&self,
symbol: &str,
period: Period,
structure: Option<&str>,
) -> Result<Vec<RevenueGeographicSegmentation>>
pub async fn get_revenue_geographic_segmentation( &self, symbol: &str, period: Period, structure: Option<&str>, ) -> Result<Vec<RevenueGeographicSegmentation>>
Get revenue geographic segmentation
Returns revenue breakdown by geographic region.
§Arguments
symbol- Stock symbol (e.g., “AAPL”)period- Period (Annual or Quarter)structure- “flat” for simple structure (optional)
§Example
let client = FmpClient::new()?;
let segments = client.financials().get_revenue_geographic_segmentation("AAPL", Period::Annual, None).await?;
for seg in segments {
println!("{}: {} geographic segments", seg.date, seg.segments.len());
}Sourcepub async fn get_financial_full_as_reported(
&self,
symbol: &str,
period: Period,
) -> Result<Vec<FinancialAsReported>>
pub async fn get_financial_full_as_reported( &self, symbol: &str, period: Period, ) -> Result<Vec<FinancialAsReported>>
Get full financial statement as reported (comprehensive XBRL data)
Returns the complete set of as-reported financial data from SEC filings.
This is more comprehensive than get_financial_as_reported().
§Arguments
symbol- Stock symbol (e.g., “AAPL”)period- Period (Annual or Quarter)
§Example
let client = FmpClient::new()?;
let statements = client.financials().get_financial_full_as_reported("AAPL", Period::Annual).await?;
for stmt in statements.iter().take(1) {
println!("Date: {}, Period: {}", stmt.date, stmt.period);
println!("XBRL fields: {}", stmt.data.len());
}