market_data
Retrieve raw financial data for tickers—historical prices, statements, quotes, calendars, analyst estimates and ownership—when you need source values rather than precomputed ratios.
Instructions
Raw financial data (historical prices, income statement, balance sheet, cash flow statement, company profile, quotes, analyst estimates (get_analyst_estimates: consensus revenue, EBITDA, EBIT, net income, SGA and EPS per period with the number of analysts behind the revenue and the EPS consensus, 'Number of Analysts Revenue' and 'Number of Analysts EPS'; far-out years often rest on a few), dividend/earnings calendars (with the scheduled dates after today, e.g. the next earnings release), statistics, market risk premium by country, CFTC Commitment of Traders report, executives and their compensation, company notes, employee count, share float, mergers and acquisitions, stock splits, insider trade statistics, institutional (13F) ownership per quarter, FINRA daily short sale volume, analyst stock grades, analyst price targets (get_price_targets: today's consensus, high, low and median with the upside to the share price, the dispersion, the revision momentum and the date of the most recent target with the days since; get_price_target_history: every published target with the upside it implied and the analyst company's previous target (published in the year before), its date and the Target Change; a target without a previous one is new coverage), monthly buy/hold/sell recommendation counts with the mean recommendation (get_analyst_recommendations), earnings call transcripts). Use this ONLY for raw data needs — for pre-computed ratios, performance, risk, or model metrics use the dedicated tools instead. Requires tickers='AAPL' — use comma-separated values for multiple tickers. basket=true adds a 'Total' to the financial statements, each line item the sum of the tickers (e.g. the combined capital expenditure of a group of companies with trailing=4 and quarterly=true; EPS and share counts stay empty). get_market_risk_premium (by country) and get_treasury_data (US Treasury rates) are market-wide and need no tickers. get_commitment_of_traders takes CFTC futures symbols, e.g. tickers='NG' (natural gas) or 'GC' (gold), not stocks. get_earnings_surprise gives per announcement the EPS and revenue against the analyst consensus (surprise as a decimal), the SUE and the share's reaction over days -1 to +1 against the benchmark. get_earnings_call_transcripts returns the full, never shortened text (often 40,000 to 60,000 characters) of one call of one ticker: the most recent, or the one of fiscal_period (e.g. '2025Q4', the company's own fiscal quarter); call it once per ticker and period. A period without a transcript is answered with the most recent periods that have one. Currency and crypto pairs may be written either way: EURUSD or EURUSD=X, BTCUSD or BTC-USD. get_short_volume is the daily short SALE volume FINRA reports for US-listed stocks (short volume, total FINRA-reported volume, short volume ratio and its z-score), not short interest; it covers the history_days (92 by default, one download per trading day) before end_date. To find which instruments exist, use the Finance Database server. The holdings, information and sector and country weightings of ETFs and funds are in the etf tool.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"indicator": "<indicator>"
},
"name": "market_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lag | No | Number of periods to lag when computing growth rates. | |
| rank | No | true ranks the tickers (or countries) within every period, from the highest value (rank 1) to the lowest, and compares each with its neighbour toward the middle of the ranking: the Difference (in points for returns) and the Multiple (only when both have the same sign), so the first and last rank show how far the best and the worst stand apart, e.g. a fall more than twice as large as the next one. Needs a value per period and ticker; pick one field with show_columns where there are more. | |
| limit | No | The rows to return, like head and tail: 5 for the first five, -5 for the last five (the most recent of a time series). A table with its periods as columns (financial statements, ratios) keeps its first or last periods instead, and rows per ticker (an earnings calendar) are selected per ticker. For ETF holdings the largest (or, negative, the smallest) by weight, and for a list (e.g. news or a screener) its length. 0 returns every row. | |
| basket | No | Also analyse the tickers as one company, 'Total': its statements are the sums of theirs and its ratios are calculated on those sums (per-share figures stay empty). | |
| growth | No | Return period-over-period growth rates instead of absolute values. | |
| latest | No | Whether to only retrieve the most recent transcript. When False, every transcript between the start_date and end_date is retrieved. | |
| period | No | Observation frequency, e.g. 'daily', 'weekly', 'monthly', 'quarterly', or 'annual' (supported values differ per method). Leave unset to use the default of the indicator you selected. Defaults are 'daily' for get_historical_data, get_treasury_data; '1hour' for get_intraday_data. | |
| window | No | The number of periods the indicator looks back over, e.g. 14 or 20. Leave unset to use the default of the indicator you selected. Defaults are 1 for get_earnings_surprise; 20 for get_short_volume. | |
| tickers | No | Comma-separated ticker symbols, e.g. 'AAPL,MSFT,GOOGL'. | |
| compound | No | With growth=true, return the compound annual growth rate (CAGR) over the lag instead of the total change, e.g. lag=5 for the five-year CAGR (lag=20 with quarterly=true). Missing when either value is zero or negative. | |
| end_date | No | End of the date range in YYYY-MM-DD format; left empty, today (or the indicator's own window). | |
| fill_nan | No | For get_historical_data, get_treasury_data: Defines whether to forward fill NaN values. This defaults to True to prevent holes in the dataset. This is especially relevant for technical indicators. For get_intraday_data: Defines whether to forward fill NaN values. | |
| trailing | No | Trailing window size in number of periods. Sums the raw values over the trailing N periods (e.g. trailing=4 on quarterly data gives a trailing-4-quarter / TTM-style sum) instead of returning one value per period. | |
| indicator | Yes | Name of the specific metric to calculate, one of the listed values. Required — search_metrics finds the indicator (and its tool) for a metric by name. | |
| quarterly | No | Return quarterly data instead of annual when True. | |
| start_date | No | Start of the date range in YYYY-MM-DD format; left empty, five years before today (or the indicator's own window). | |
| sue_window | No | The number of earlier announcements whose EPS surprises scale the SUE. | |
| show_errors | No | Whether to report retrieval errors. | |
| actual_dates | No | Defines whether to return the actual dates or the corresponding quarters. | |
| history_days | No | The number of calendar days before the Toolkit's end date to retrieve, never before its start date. None retrieves the Toolkit's whole date range (one download per trading day). Leave unset to use the default of the indicator you selected. Defaults are 92 for get_short_volume. | |
| show_columns | No | Comma-separated names to filter the output. For historical data use the key names visible in any response record (e.g. 'Close,Volume,Return'). For financial statements use the 'metric' field values from the response (e.g. 'Revenue,Net Income,EBITDA'). Call the tool once without this parameter to see all available names, then repeat with show_columns to reduce response size and token usage. | |
| fiscal_period | No | The company's fiscal quarter, e.g. '2025Q4' (its own fiscal year, which differs from the calendar year for e.g. Apple and Microsoft). Leave unset for the most recent. | |
| return_column | No | The column to use for the return calculation. Leave unset to use the default of the indicator you selected. Defaults are 'Adj Close' for get_historical_data; 'Close' for get_intraday_data. | |
| divide_ohlc_by | No | A value to divide the yields by. Treasury yields are published in percent, so this defaults to 100 to return decimals. | |
| enforce_source | No | For get_balance_sheet_statement, get_cash_flow_statement, get_income_statement, get_statistics_statement: Forces this specific call to use a given source, either "FinancialModelingPrep" or "YahooFinance". This takes precedence over the source set on the Toolkit itself, so one instance can pull historical data from Yahoo Finance while still using a FinancialModelingPrep key for the financial... For get_historical_data: A string containing the historical source you wish to enforce. This can be either FinancialModelingPrep or YahooFinance. For get_treasury_data: Forces this specific call to use a given source, either "FinancialModelingPrep" or "YahooFinance". This takes precedence over the source set on the Toolkit itself. | |
| risk_free_rate | No | The US Treasury yield used as the risk-free rate: '13w' (the 13-week bill), '5y', '10y' (default) or '30y'. | |
| benchmark_ticker | No | Ticker used as the market benchmark, e.g. 'SPY' or '^GSPC'; 'None' for no benchmark. | SPY |
| include_dividends | No | Defines whether to include dividends in the return calculation. | |
| show_ticker_separation | No | A boolean representing whether to show which tickers acquired data from FinancialModelingPrep and which tickers acquired data from YahooFinance. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |