> For the complete documentation index, see [llms.txt](https://docs.quadratichq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quadratichq.com/python/financial-data.md).

# Financial data

## Financial data

Quadratic includes a built-in financial data API for Python — no API keys or external accounts required. Use `q.financial` to pull stock prices, company fundamentals, financial statements, news, and technical indicators straight into your sheet.

### Quick start

All methods are async — use `await`:

```python
# Daily stock prices as a DataFrame
prices = await q.financial.stock_prices('AAPL', start='2025-01-01')
prices
```

```python
# Latest real-time quote
quote = await q.financial.realtime_price('NVDA')
quote['last_price']
```

### Available methods

| Method                                                                    | Returns                                                                                                                     |
| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `stock_prices(identifier, start, end, frequency)`                         | Historical prices (DataFrame)                                                                                               |
| `realtime_price(identifier)`                                              | Real-time quote (dict)                                                                                                      |
| `intraday_prices(identifier)`                                             | Intraday bars                                                                                                               |
| `company(identifier)`                                                     | Company profile (dict)                                                                                                      |
| `company_news(identifier, start_date)`                                    | Recent news                                                                                                                 |
| `financial_statements(identifier, statement, fiscal_year, fiscal_period)` | Income statement, balance sheet, or cash flow (DataFrame)                                                                   |
| `dividends(identifier)`                                                   | Dividend history                                                                                                            |
| `splits(identifier)`                                                      | Split history                                                                                                               |
| `data_point(identifier, tag)`                                             | Single numeric metric                                                                                                       |
| `data_point_text(identifier, tag)`                                        | Single text metric                                                                                                          |
| `historical_data(identifier, tag)`                                        | Metric time series                                                                                                          |
| `technical_indicator(identifier, indicator, ...)`                         | Technical indicators (DataFrame): `sma`, `rsi`, `macd`, `bollinger_bands`, `vwap`, `atr`, `adx`, `obv`, `stochastic`, `cci` |

{% hint style="info" %}
Prefer adjusted prices for historical analysis — they account for splits and dividends.
{% endhint %}

### Prefer formulas?

The Excel-compatible `STOCKHISTORY` function retrieves historical prices without writing Python:

```
=STOCKHISTORY("MSFT", "2025-01-01", "2025-12-31")
```

### Rate limits

Financial data requests are limited to 500 requests per team per minute. If your team hits the limit, requests briefly pause and a notification appears in the app.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.quadratichq.com/python/financial-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
