get_comparison_chart_data
Retrieve time-series data for comparing up to 10 stocks, with options for normalized returns or raw adjusted close prices.
Instructions
Return time-series data for a multi-stock comparison (複数銘柄比較データ). All plans.
Use for 比較チャート・パフォーマンス比較・リターン比較・relative performance queries (up to 10 codes). Returns JSON records suitable for React artifact rendering with Recharts LineChart. For ローソク足・candlestick charts use sibling get_candlestick_data (returns JSON).
[Supported plans] Free / Light / Standard / Premium (cache-only, no API call)
Args: codes: 1–10 stock codes (e.g. ["7203", "8697"]). from_date: Range start (YYYYMMDD or YYYY-MM-DD), inclusive. to_date: Range end (YYYYMMDD or YYYY-MM-DD), inclusive. mode: "return_pct" (default, normalised to 0% at first bar) or "price" (raw adjusted close). labels: Custom legend labels per code. Omit for auto-generated names.
Returns: dict with keys: mode — echoes the requested mode from_date — normalised YYYY-MM-DD to_date — normalised YYYY-MM-DD records — list of {"date": str, : float, ...} rows (Recharts dataKey format) series_keys — ordered list of label strings matching records keys On error: {"error": ""}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| codes | Yes | ||
| from_date | Yes | ||
| to_date | Yes | ||
| mode | No | return_pct | |
| labels | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||