Expand description
Financial Modeling Prep (FMP) financial data API (requires fmp feature).
Financial Modeling Prep API client for financial data.
Requires the fmp feature flag and an API key from
https://financialmodelingprep.com/.
Call [init] once at startup before using any query functions.
§Quick Start
use finance_query::adapters::fmp;
use finance_query::adapters::fmp::Period;
fmp::init("YOUR_API_KEY")?;
// Real-time quote
let quotes = fmp::quote("AAPL").await?;
// Income statement
let income = fmp::income_statement("AAPL", Period::Quarter, Some(4)).await?;
// Company profile
let profile = fmp::company_profile("AAPL").await?;Re-exports§
pub use models::*;
Modules§
- models
- Shared types for Financial Modeling Prep API responses.
Structs§
- Analyst
Estimate - Analyst estimate entry.
- Analyst
Recommendation - Analyst recommendation entry.
- Available
Symbol - An available cryptocurrency or forex/commodity symbol.
- Balance
Sheet - Balance sheet statement from FMP.
- Cash
Flow - Cash flow statement from FMP.
- CikMapping
- CIK mapping entry.
- CikResult
- A result from the CIK search endpoint.
- Company
Outlook - Company outlook from FMP (v4 endpoint).
- Company
Profile - Company profile from FMP.
- Company
Rating - Company rating from FMP.
- Congressional
Trade - Congressional/senate trading record.
- CotAnalysis
- A Commitment of Traders analysis entry.
- CotReport
- A Commitment of Traders report entry.
- CotSymbol
- A symbol available in the Commitment of Traders report.
- Delisted
Company - Delisted company from FMP.
- Discounted
Cash Flow - Discounted cash flow valuation from FMP.
- Dividend
Calendar Entry - Dividend calendar entry.
- Dividend
History - A single historical dividend record.
- Dividend
History Response - Historical dividend response wrapper.
- Earnings
Calendar Entry - Earnings calendar entry.
- Earnings
Surprise - Earnings surprise entry.
- Earnings
Transcript - Earnings call transcript entry.
- Earnings
Transcript Ref - Earnings transcript list entry (available transcripts).
- Economic
Calendar Entry - Economic calendar entry.
- Enterprise
Value - Enterprise value from FMP.
- EtfCountry
Weighting - ETF country weighting entry.
- EtfHolder
- ETF holder entry.
- EtfHolding
- ETF holding entry.
- EtfSector
Weighting - ETF sector weighting entry.
- Fail
ToDeliver - Fail-to-deliver record.
- Financial
Growth - Financial growth metrics from FMP.
- Financial
Ratios - Financial ratios from FMP.
- FmpArticle
- FMP article from their own editorial.
- FmpArticles
Response - FMP articles response wrapper (paginated).
- Form13F
- Form 13F filing entry.
- Historical
Constituent - A historical change in index constituency.
- Historical
Dcf - Historical discounted cash flow from FMP.
- Historical
Price Params - Optional parameters for historical price queries.
- Historical
Sector Performance - Historical sector performance entry.
- Income
Statement - Income statement from FMP.
- Index
Constituent - A constituent of a major index (S&P 500, Nasdaq, Dow Jones).
- Industry
Pe - Industry price-to-earnings ratio entry.
- Insider
Trade - Insider trading transaction record.
- Institutional
Holder - Institutional holder entry.
- IpoCalendar
Entry - IPO calendar entry.
- KeyExecutive
- Key executive from FMP.
- KeyMetrics
- Key metrics from FMP.
- Market
Cap - Market capitalization from FMP.
- Market
Mover - Market mover entry (gainers, losers, most active).
- Mutual
Fund Holder - Mutual fund holder entry.
- Press
Release - Press release.
- Screener
Result - A result from the stock screener endpoint.
- Search
Result - A result from the symbol search endpoint.
- Sector
Pe - Sector price-to-earnings ratio entry.
- Sector
Performance - Sector performance entry.
- SicCode
- Standard Industrial Classification code entry.
- SicEntry
- Detailed SIC entry for a specific code.
- Split
History - A single historical stock split record.
- Split
History Response - Historical stock split response wrapper.
- Stock
Grade - Stock grade entry.
- Stock
List Entry - An entry from the stock/ETF list endpoints.
- Stock
News - Stock news article.
- Stock
Peers - Stock peer from FMP (v4 endpoint).
- Stock
Price Change - Stock price change from FMP.
- Stock
Split Calendar Entry - Stock split calendar entry.
- Technical
Indicator Value - A single technical indicator data point.
Functions§
- analyst_
estimates - Fetch analyst estimates for a symbol.
- analyst_
recommendations - Fetch analyst stock recommendations.
- balance_
sheet - Fetch balance sheet statements for a symbol.
- balance_
sheet_ as_ reported - Fetch balance sheet statements as reported for a symbol.
- batch_
quote - Fetch real-time quotes for multiple symbols (comma-separated).
- bulk_
balance_ sheets - Fetch bulk balance sheet statements as raw JSON.
- bulk_
cash_ flow - Fetch bulk cash flow statements as raw JSON.
- bulk_
income_ statements - Fetch bulk income statements as raw JSON.
- bulk_
key_ metrics - Fetch bulk key metrics as raw JSON.
- bulk_
profiles - Fetch all company profiles as raw JSON.
- bulk_
ratios - Fetch bulk financial ratios as raw JSON.
- cash_
flow - Fetch cash flow statements for a symbol.
- cash_
flow_ as_ reported - Fetch cash flow statements as reported for a symbol.
- cik_
mapper - Search CIK mappings by name.
- cik_
mapper_ by_ company - Fetch CIK mapping by company name/identifier.
- cik_
search - Look up a company by CIK number.
- commodity_
available - List all available commodities.
- commodity_
historical - Fetch daily historical prices for a commodity.
- commodity_
quote - Fetch a real-time commodity quote.
- company_
outlook - Fetch company outlook for a symbol (v4 endpoint).
- company_
profile - Fetch company profile for a symbol.
- company_
rating - Fetch company rating for a symbol.
- congressional_
trading - Fetch congressional (senate) trading data for a symbol.
- cot_
analysis - Fetch a Commitment of Traders analysis for a symbol.
- cot_
report - Fetch a Commitment of Traders report for a symbol.
- cot_
symbols - Fetch available COT report symbols.
- crypto_
available - List all available cryptocurrency pairs.
- crypto_
historical - Fetch daily historical prices for a cryptocurrency.
- crypto_
intraday - Fetch intraday prices for a cryptocurrency.
- crypto_
news - Fetch crypto news.
- crypto_
quote - Fetch a real-time crypto quote.
- daily_
adx - Fetch daily Average Directional Index (ADX).
- daily_
dema - Fetch daily Double Exponential Moving Average (DEMA).
- daily_
ema - Fetch daily Exponential Moving Average (EMA).
- daily_
macd - Fetch daily MACD.
- daily_
rsi - Fetch daily Relative Strength Index (RSI).
- daily_
sma - Fetch daily Simple Moving Average (SMA).
- daily_
tema - Fetch daily Triple Exponential Moving Average (TEMA).
- daily_
williams - Fetch daily Williams %R.
- daily_
wma - Fetch daily Weighted Moving Average (WMA).
- delisted_
companies - Fetch delisted companies.
- discounted_
cash_ flow - Fetch current discounted cash flow valuation for a symbol.
- dividend_
calendar - Fetch dividend calendar within a date range.
- dow_
constituents - Fetch current Dow Jones constituents.
- earnings_
calendar - Fetch earnings calendar within a date range.
- earnings_
surprises - Fetch earnings surprises for a symbol.
- earnings_
transcript - Fetch an earnings call transcript.
- earnings_
transcript_ list - Fetch a list of available earnings transcripts for a symbol.
- economic_
calendar - Fetch economic calendar within a date range.
- enterprise_
value - Fetch enterprise values for a symbol.
- etf_
available - List all available ETFs.
- etf_
country_ weightings - Fetch ETF country weightings.
- etf_
historical - Fetch daily historical prices for an ETF.
- etf_
holders - Fetch ETF holders of a stock.
- etf_
holdings - Fetch ETF holdings (same endpoint as ETF holder).
- etf_
list - Fetch the full list of ETFs.
- etf_
quote - Fetch a real-time ETF quote.
- etf_
sector_ weightings - Fetch ETF sector weightings.
- fail_
to_ deliver - Fetch fail-to-deliver data for a symbol.
- financial_
growth - Fetch financial growth metrics for a symbol.
- financial_
ratios - Fetch financial ratios for a symbol.
- financial_
statement_ symbols - Fetch symbols that have financial statements available.
- fmp_
articles - Fetch FMP editorial articles.
- forex_
available - List all available forex currency pairs.
- forex_
historical - Fetch daily historical prices for a forex pair.
- forex_
intraday - Fetch intraday prices for a forex pair.
- forex_
news - Fetch forex news.
- forex_
quote - Fetch a real-time forex quote.
- form_
13f - Fetch Form 13F filings for a CIK.
- full_
financial_ statement - Fetch full financial statement as reported for a symbol.
- historical_
dcf - Fetch historical discounted cash flow for a symbol.
- historical_
dividends - Fetch historical dividend data for a symbol.
- historical_
market_ cap - Fetch historical market capitalization for a symbol.
- historical_
price_ daily - Fetch historical daily prices for a symbol.
- historical_
price_ intraday - Fetch intraday historical prices for a symbol.
- historical_
rating - Fetch historical ratings for a symbol.
- historical_
sector_ performance - Fetch historical sector performance.
- historical_
sp500 - Fetch historical S&P 500 constituent changes.
- historical_
splits - Fetch historical stock split data for a symbol.
- income_
statement - Fetch income statements for a symbol.
- income_
statement_ as_ reported - Fetch income statements as reported for a symbol.
- index_
historical - Fetch daily historical prices for an index.
- industries_
pe - Fetch industry PE ratios.
- init
- Initialize the global FMP client with an API key.
- init_
with_ timeout - Initialize the FMP client with a custom timeout.
- insider_
trading - Fetch insider trading transactions for a symbol.
- insider_
trading_ rss - Fetch the insider trading RSS feed.
- institutional_
holders - Fetch institutional holders of a stock.
- intraday_
adx - Fetch intraday Average Directional Index (ADX).
- intraday_
dema - Fetch intraday Double Exponential Moving Average (DEMA).
- intraday_
ema - Fetch intraday Exponential Moving Average (EMA).
- intraday_
macd - Fetch intraday MACD.
- intraday_
rsi - Fetch intraday Relative Strength Index (RSI).
- intraday_
sma - Fetch intraday Simple Moving Average (SMA).
- intraday_
tema - Fetch intraday Triple Exponential Moving Average (TEMA).
- intraday_
williams - Fetch intraday Williams %R.
- intraday_
wma - Fetch intraday Weighted Moving Average (WMA).
- ipo_
calendar - Fetch IPO calendar within a date range.
- key_
executives - Fetch key executives for a symbol.
- key_
metrics - Fetch key metrics for a symbol.
- major_
indexes_ quote - Fetch real-time quotes for all major indexes.
- market_
cap - Fetch market capitalization for a symbol.
- mutual_
fund_ available - List all available mutual funds.
- mutual_
fund_ historical - Fetch daily historical prices for a mutual fund.
- mutual_
fund_ holders - Fetch mutual fund holders of a stock.
- mutual_
fund_ quote - Fetch a real-time mutual fund quote.
- nasdaq_
constituents - Fetch current Nasdaq constituents.
- press_
releases - Fetch press releases for a symbol.
- quote
- Fetch real-time quote for a symbol.
- sector_
performance - Fetch current sector performance.
- sectors_
pe - Fetch sector PE ratios.
- sic_
by_ code - Fetch companies by SIC code.
- sic_
codes - Fetch all SIC codes.
- sp500_
constituents - Fetch current S&P 500 constituents.
- stock_
grade - Fetch stock grade history for a symbol.
- stock_
market_ gainers - Fetch top stock market gainers.
- stock_
market_ losers - Fetch top stock market losers.
- stock_
market_ most_ active - Fetch most active stocks.
- stock_
news - Fetch stock news articles.
- stock_
peers - Fetch stock peers for a symbol (v4 endpoint).
- stock_
price - Fetch stock price change percentages for a symbol.
- stock_
screener - Screen stocks by various financial criteria.
- stock_
split_ calendar - Fetch stock split calendar within a date range.
- symbol_
search - Search for symbols matching a query string.
- symbols_
list - Fetch the full list of stocks.
- tradable_
symbols_ list - Fetch all tradable symbols.