twse_get_dataset
取得證交所或期交所資料集內容,支援伺服器端過濾、欄位投影與分頁。兩邊的每個資料集都是一次回整份(可能上萬筆),務必用 code/match/fields 縮小範圍。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | 證券/基金/契約代號,例如 "0050"、"TX"。一律精確比對(不分大小寫),實際用了哪個欄位會回在 code_field_used。找不到完全相符的代號時回 0 筆,並在 code_candidates 給出拼法相近的代號——**那些是候選不是答案**,可能是不同商品(MXF 與 MXFFX 是不同契約),請確認後改用該代號重查,不要直接引用它們的數字。 | |
| limit | No | 回傳筆數上限(硬上限 200)。 | |
| match | No | 其他欄位的子字串過濾,例如 {"基金類型": "ETF"}。最多 20 個欄位。 | |
| fields | No | 只回傳這些欄位。 | |
| offset | No | 分頁位移。 | |
| dataset_id | Yes | 資料集代號,例如 "exchangeReport/STOCK_DAY_ALL"。 |