pub struct CompanyInfo { /* private fields */ }Expand description
Company information API endpoints
Implementations§
Source§impl CompanyInfo
impl CompanyInfo
Sourcepub async fn get_profile(&self, symbol: &str) -> Result<Vec<CompanyProfile>>
pub async fn get_profile(&self, symbol: &str) -> Result<Vec<CompanyProfile>>
Get company profile
Sourcepub async fn get_executives(&self, symbol: &str) -> Result<Vec<Executive>>
pub async fn get_executives(&self, symbol: &str) -> Result<Vec<Executive>>
Get company executives
Sourcepub async fn get_market_cap(&self, symbol: &str) -> Result<Vec<MarketCap>>
pub async fn get_market_cap(&self, symbol: &str) -> Result<Vec<MarketCap>>
Get company market cap
Sourcepub async fn get_historical_market_cap(
&self,
symbol: &str,
from: Option<&str>,
to: Option<&str>,
) -> Result<Vec<MarketCap>>
pub async fn get_historical_market_cap( &self, symbol: &str, from: Option<&str>, to: Option<&str>, ) -> Result<Vec<MarketCap>>
Get historical market cap
Get share float
Sourcepub async fn get_outlook(&self, symbol: &str) -> Result<CompanyOutlook>
pub async fn get_outlook(&self, symbol: &str) -> Result<CompanyOutlook>
Get comprehensive company outlook
Returns a comprehensive view of company data including profile, metrics, ratios, insider trades, executives, and more.
§Arguments
symbol- Stock symbol (e.g., “AAPL”)
§Example
let client = FmpClient::new()?;
let outlook = client.company_info().get_outlook("AAPL").await?;
println!("Company: {}", outlook.profile.company_name);
if let Some(rating) = &outlook.rating {
if let Some(r) = rating.first() {
println!("Rating: {} (Score: {})", r.rating, r.rating_score);
}
}Sourcepub async fn get_rating(&self, symbol: &str) -> Result<Vec<CompanyRating>>
pub async fn get_rating(&self, symbol: &str) -> Result<Vec<CompanyRating>>
Get company rating
Returns the company’s rating and score based on various financial metrics.
§Arguments
symbol- Stock symbol (e.g., “AAPL”)
§Example
let client = FmpClient::new()?;
let ratings = client.company_info().get_rating("AAPL").await?;
for rating in ratings {
println!("Rating: {} (Score: {})", rating.rating, rating.rating_score);
println!("Recommendation: {}", rating.rating_recommendation);
}Sourcepub async fn get_historical_rating(
&self,
symbol: &str,
limit: Option<u32>,
) -> Result<Vec<CompanyRating>>
pub async fn get_historical_rating( &self, symbol: &str, limit: Option<u32>, ) -> Result<Vec<CompanyRating>>
Get historical company rating
Returns historical ratings for a company over time.
§Arguments
symbol- Stock symbol (e.g., “AAPL”)limit- Number of results (optional)
§Example
let client = FmpClient::new()?;
let ratings = client.company_info().get_historical_rating("AAPL", Some(10)).await?;
for rating in ratings {
println!("{}: {} (Score: {})", rating.date, rating.rating, rating.rating_score);
}Sourcepub async fn get_core_info(&self, symbol: &str) -> Result<Vec<CompanyCoreInfo>>
pub async fn get_core_info(&self, symbol: &str) -> Result<Vec<CompanyCoreInfo>>
Get company core information
Returns basic company information including CIK, symbol, and exchange.
§Arguments
symbol- Stock symbol (e.g., “AAPL”)
§Example
let client = FmpClient::new()?;
let info = client.company_info().get_core_info("AAPL").await?;
println!("CIK: {}, Exchange: {}", info.cik, info.exchange);Auto Trait Implementations§
impl Freeze for CompanyInfo
impl !RefUnwindSafe for CompanyInfo
impl Send for CompanyInfo
impl Sync for CompanyInfo
impl Unpin for CompanyInfo
impl !UnwindSafe for CompanyInfo
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