Get daily price history
get_historyRetrieve daily OHLCV history for Taiwan stocks or ETFs from TWSE/TPEx by range or dates, with optional moving averages and summary metrics for trend analysis.
Instructions
Daily OHLCV history for one Taiwan stock or ETF (TWSE or TPEx), with a summary and optional moving averages. Choose a window with range (1m, 3m, 6m, 1y back from today) or start/end dates (max 366 days). Bars default to daily for windows up to about 3 months and weekly beyond that; pass interval to override. summary gives the change from reference_close (the close of the last trading day before the window, as "how did it do this month" means), high/low with dates and average volume. Units are normalised across both exchanges: prices in TWD, volume in shares, turnover in TWD. Dates are Asia/Taipei trading days. Data is end-of-day and updates after the close (about 14:30 Taipei); use get_quote for intraday prices.
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": {
"symbol": "<symbol>"
},
"name": "get_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Last date, YYYY-MM-DD. Default today. | |
| range | No | Window ending today. Default "1m". Do not combine with start. | |
| start | No | First date, YYYY-MM-DD. | |
| market | No | Omit to detect automatically. | |
| symbol | Yes | Code ("2330", "6488.TWO") or exact name ("台積電"). | |
| interval | No | Bar size. Default: "day" up to ~3 months, else "week". Week and month bars aggregate daily data. | |
| moving_averages | No | Simple moving averages of daily closes, e.g. [5, 20, 60]. Earlier data is loaded so values start at the first bar. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | ||
| bars | Yes | ||
| code | Yes | ||
| name | No | ||
| notes | Yes | ||
| start | Yes | ||
| market | Yes | ||
| summary | Yes | Null when there were no trading days in the window. change and change_percent are measured from reference_close (the last close before the window, dated reference_date), not from first_close. | |
| interval | Yes |