get_taiwan_stock_price
Retrieve real-time Taiwan stock prices using a stock code or company name. Get current price, change, volume, high/low, open, and previous close to make informed decisions.
Instructions
取得台灣股票即時價格資訊。
支援股票代碼或公司名稱查詢:
股票代碼: 4-6位數字 + 可選字母 (例如: 2330, 0050, 00648R)
公司名稱: 完整或部分公司名稱 (例如: "台積電", "鴻海")
使用範例: get_taiwan_stock_price("2330") # 使用股票代碼 get_taiwan_stock_price("台積電") # 使用公司名稱 get_taiwan_stock_price("0050") # 查詢ETF
Args: symbol: 台灣股票代號或公司名稱
Returns: MCPToolResponse[StockPriceData]: 統一格式的回應,包含: - success (bool): 操作是否成功 - data (StockPriceData): 股票價格資訊,包含: * symbol: 股票代碼 * company_name: 公司名稱 * current_price: 當前價格 * change: 漲跌金額 * change_percent: 漲跌幅百分比 * volume: 成交量 * high/low/open: 最高/最低/開盤價 * previous_close: 昨收價 * last_update: 最後更新時間 - error (str): 錯誤訊息(失敗時) - tool (str): 工具名稱 - timestamp: 回應時間戳
Raises: 查詢失敗時返回錯誤回應,可能的原因: - 股票代碼不存在 - 網路連線問題 - API 服務異常
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes |