Compare Taiwan stocks side by side
compare_stocksCompare 2-10 Taiwan stocks (TWSE and TPEx) side by side in one call for price returns, valuation, revenue growth, margins and foreign ownership, with highs, lows and medians summarized.
Instructions
Compare 2-10 Taiwan stocks side by side in one call, mixing TWSE (上市) and TPEx (上櫃) freely: latest close, 1M / 3M / 1Y price return, P/E, P/B, dividend yield, latest monthly revenue YoY, gross / operating / net margin from the latest quarterly report, and foreign ownership %. Use this instead of calling get_stock_overview or get_fundamentals once per stock: it reads full-market snapshots, so its cost does not grow with the number of stocks, and summary already gives the highest, lowest and median of every metric, so no arithmetic is needed. Returns are price returns between end-of-day closes, not adjusted for dividends, stock dividends or splits. Each starts at the last trading day on or before the same date 1, 3 or 12 months before the latest close; as_of gives the dates every source covers, per market. Margins are year to date through margins_period, as Taiwan income statements are cumulative. Prices are TWD. Accepts codes ("2330", "6488.TWO") or exact names ("台積電"). Inputs that cannot be resolved are listed in unresolved with suggestions. A missing value is null with the reason in notes; a source that failed is named in warnings and the rest is still returned. End-of-day data only: use get_quote for intraday prices, get_stock_overview for one stock in depth.
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": {
"symbols": "<symbols>"
},
"name": "compare_stocks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| market | No | Only accept stocks on this market. Omit to detect each automatically (recommended). | |
| symbols | Yes | Codes or exact names, e.g. ["2330", "2454", "鴻海", "6488"]. 2 to 10. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_of | Yes | What each source covers, for each market compared. null when the source was unavailable or had nothing for these stocks. | |
| notes | Yes | How the figures are measured, the dates used, and why a value is null | |
| stocks | Yes | One row per resolved stock, in input order. | |
| summary | Yes | Per metric (the row fields): the highest and lowest stock with its value, the median and how many stocks have a value. Higher is not always better: a lower P/E or P/B means cheaper, not worse. | |
| warnings | Yes | ||
| unresolved | Yes |