get_kpi_history
Retrieve historical KPI values for a specific instrument, such as P/E or P/S ratios, over time. Specify the instrument, KPI, report type, and price sampling to get the data.
Instructions
Get historical KPI values for one instrument. Not all screener KPIs have history — only a subset. Read 'borsdata://reference/kpi-metadata' for available KPI IDs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| insId | Yes | Instrument ID | |
| kpiId | Yes | KPI ID (e.g. 2=P/E, 3=P/S) | |
| maxCount | No | Max history entries to return | |
| priceType | Yes | How stock price is sampled: low, mean, or high | |
| reportType | Yes | Report type: year, r12 (rolling 12 months), or quarter |