# STOCKHISTORY Function

> Return historical stock prices as an array with STOCKHISTORY in TX Sheet Control: the arguments, the required formula provider and the #N/A result.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > STOCKHISTORY Function
- **269 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/stockhistory/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/stockhistory/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/stockhistory/llms-full.txt

---

Return historical price data of a stock or other financial instrument as an array. `stock` is the ticker symbol, and `start_date` and `end_date` limit the period; the further arguments choose the interval, the headers and the properties to return. STOCKHISTORY requires host-provided data: it calculates only when the application supplies the prices through a formula provider, and without one it returns `#N/A`.

### Syntax

```text
STOCKHISTORY(stock, start_date, end_date, interval, headers, property0, property1)
```

Category: Financial. Minimum arguments: 2. Maximum arguments: 11.

> Important
>
> **Application Data or Provider Required.** Configure the documented provider rather than expecting automatic network or Excel-service access.

### Examples

```text
=STOCKHISTORY("MSFT",DATE(2026,1,1),DATE(2026,1,2))
```

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [STEYX Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/steyx/llms-full.txt)
- **Next:** [SUBSTITUTE Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/substitute/llms-full.txt)
