> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
