pub struct Congress { /* private fields */ }Expand description
Congressional and Insider Trading API endpoints
Implementations§
Source§impl Congress
impl Congress
Sourcepub async fn get_congressional_trades(
&self,
symbol: Option<&str>,
) -> Result<Vec<CongressionalTrade>>
pub async fn get_congressional_trades( &self, symbol: Option<&str>, ) -> Result<Vec<CongressionalTrade>>
Get congressional trading data (House and Senate)
§Arguments
symbol- Stock symbol (optional, if None returns all congressional trades)
§Example
let client = FmpClient::builder().api_key("your_api_key").build()?;
let congress = client.congress();
// Get all congressional trades
let all_trades = congress.get_congressional_trades(None).await?;
// Get congressional trades for a specific stock
let aapl_trades = congress.get_congressional_trades(Some("AAPL")).await?;Sourcepub async fn get_house_trades(
&self,
symbol: Option<&str>,
) -> Result<Vec<CongressionalTrade>>
pub async fn get_house_trades( &self, symbol: Option<&str>, ) -> Result<Vec<CongressionalTrade>>
Sourcepub async fn get_insider_trades(
&self,
symbol: &str,
page: Option<i32>,
) -> Result<Vec<InsiderTrade>>
pub async fn get_insider_trades( &self, symbol: &str, page: Option<i32>, ) -> Result<Vec<InsiderTrade>>
Get insider trading transactions for a company
§Arguments
symbol- Company stock symbolpage- Page number (optional, defaults to 0)
§Example
let client = FmpClient::builder().api_key("your_api_key").build()?;
let congress = client.congress();
let insider_trades = congress.get_insider_trades("AAPL", Some(0)).await?;Sourcepub async fn get_insider_stats(&self, symbol: &str) -> Result<Vec<InsiderStats>>
pub async fn get_insider_stats(&self, symbol: &str) -> Result<Vec<InsiderStats>>
Sourcepub async fn get_insider_roster(
&self,
symbol: &str,
) -> Result<Vec<InsiderRoster>>
pub async fn get_insider_roster( &self, symbol: &str, ) -> Result<Vec<InsiderRoster>>
Sourcepub async fn get_congressional_summary(
&self,
representative: Option<&str>,
) -> Result<Vec<CongressionalSummary>>
pub async fn get_congressional_summary( &self, representative: Option<&str>, ) -> Result<Vec<CongressionalSummary>>
Get congressional trading summary by representative
§Arguments
representative- Name of representative (optional)
§Example
let client = FmpClient::builder().api_key("your_api_key").build()?;
let congress = client.congress();
// Get all congressional summaries
let all_summaries = congress.get_congressional_summary(None).await?;
// Get specific representative
let pelosi_summary = congress.get_congressional_summary(Some("Nancy Pelosi")).await?;Sourcepub async fn get_insider_ownership(
&self,
symbol: &str,
) -> Result<Vec<InsiderOwnership>>
pub async fn get_insider_ownership( &self, symbol: &str, ) -> Result<Vec<InsiderOwnership>>
Auto Trait Implementations§
impl Freeze for Congress
impl !RefUnwindSafe for Congress
impl Send for Congress
impl Sync for Congress
impl Unpin for Congress
impl !UnwindSafe for Congress
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