AI agent?先讀 /llms.txt 取得全站索引。
市場與價格
估值資料——更完整的逐檔估值紀錄:核心比率加上市值與流通在外股數,每交易日一列。
GET /v2/datasets/valuation-datavaluation-data 為推導型資料集,在核心估值比率之外,加上每檔股票每交易日的市值與流通在外股數脈絡,係由官方價格與 MOPS 財務輸入計算。lineage 欄位回指上述官方來源,每個數字可重現而非孤立主張。
| 欄位 | 型別 | 說明 |
|---|---|---|
symbol | string | 股票代碼。 |
date | string | 交易日。 |
market_cap | number | 市值(新台幣,推導)。 |
shares_outstanding | number | 計算所用之流通在外股數。 |
per | number | 本益比(推導)。 |
source_role | string | 正規來源角色(derived_valuation_data)。 |
| 列數 | 7,625,469 |
| 涵蓋起訖 | 2006-01-02 至 2026-07-16 |
| 分級 | 衍生 |
此為本端點的真實回應。資料列位於 "rows" 之下,來源資訊如下方所示;各資料集形狀不盡相同,請以本頁為準。
{ "dataset": "valuation_data", "rows": [ { "market": "TWSE", "as_of_date": "2026-07-16", "valuation_version": "v1", "pe_ratio": 33.21, "pb_ratio": 10.87, "earnings_yield": null, "book_to_price": null, "dividend_yield": 0.89, "market_cap": 64052954065490, "shares_outstanding": 25932370067, "provider": "twse", "source_role": "official_twse_bwibbu", "lineage": { "market": "TWSE", "provider": "twse", "data_gaps": { "market_cap_deferred": true, "shares_outstanding_deferred": true, "market_cap_source_proof_required": true, "shares_outstanding_source_proof_required": true }, "source_role": "official_twse_bwibbu", "artifact_only": false, "source_endpoint": "BWIBBU_d", "controlled_write": true, "transform_version": "non_tpex_valuation_controlled_writer_v1", "controlled_write_scope": "2026-05-28_2026-07-16", "fetched_or_source_date": "2026-07-16" }, "updated_at": "2026-07-17T14:13:15.292023", "symbol": "2330", "fundamentals_context": { "generated_at": "2026-07-20T18:31:53Z", "ticker": "2330", "period": "2026-07-16", "period_type": "daily_event", "statement_family": "valuation_data", "metric_values": { "valuation_version": "v1", "pe_ratio": 33.21, "pb_ratio": 10.87, "earnings_yield": null, "book_to_price": null, "dividend_yield": 0.89, "market_cap": 64052954065490, "shares_outstanding": 25932370067, "updated_at": "2026-07-17T14:13:15.292023", "symbol": "2330" }, "source_lineage": { "provider": "unknown", "source_role": "official_twse_bwibbu", "source_table": "valuation_data_items", "ingestion_run_id": null, "transformation_version": "fundamentals_ai_context_v1", "market": "TWSE", "data_gaps": { "market_cap_deferred": true, "shares_outstanding_deferred": true, "market_cap_source_proof_required": true, "shares_outstanding_source_proof_required": true }, "artifact_only": false, "source_endpoint": "BWIBBU_d", "controlled_write": true, "transform_version": "non_tpex_valuation_controlled_writer_v1", "controlled_write_scope": "2026-05-28_2026-07-16", "fetched_or_source_date": "2026-07-16" }, "data_gaps": [], "restatement_warning": { "has_restatement": false, "reason": null, "previous_version_ref": null }, "not_investment_advice": true, "coverage_window": { "min_period": null, "max_period": null, "coverage_confidence": "medium", "row_count": 0 }, "safe_usage_notes": [ "not_investment_advice", "official_public_first_policy", "period_semantics_explicit" ], "available_tools_or_endpoints": [ { "name": "valuation_data", "path": "/v2/datasets/valuation-data" } ] } }, { "market": "TWSE", "as_of_date": "2026-07-14", "valuation_version": "v1", "pe_ratio": 32.54, "pb_ratio": 10.65, "earnings_yield": null, "book_to_price": null, "dividend_yield": 0.91, "market_cap": 62756335562140, "shares_outstanding": 25932370067, "provider": "twse", "source_role": "official_twse_bwibbu", "lineage": { "market": "TWSE", "provider": "twse", "data_gaps": { "market_cap_deferred": true, "shares_outstanding_deferred": true, "market_cap_source_proof_required": true, "shares_outstanding_source_proof_required": true }, "source_role": "official_twse_bwibbu", "artifact_only": false, "source_endpoint": "BWIBBU_d", "controlled_write": true, "transform_version": "non_tpex_valuation_controlled_writer_v1", "controlled_write_scope": "2026-05-28_2026-07-16", "fetched_or_source_date": "2026-07-14" }, "updated_at": "2026-07-17T14:13:20.617678", "symbol": "2330", "fundamentals_context": { "generated_at": "2026-07-20T18:31:53Z", "ticker": "2330", "period": "2026-07-14", "period_type": "daily_event", "statement_family": "valuation_data", "metric_values": { "valuation_version": "v1", "pe_ratio": 32.54, "pb_ratio": 10.65, "earnings_yield": null, "book_to_price": null, "dividend_yield": 0.91, "market_cap": 62756335562140, "shares_outstanding": 25932370067, "updated_at": "2026-07-17T14:13:20.617678", "symbol": "2330" }, "source_lineage": { "provider": "unknown", "source_role": "official_twse_bwibbu", "source_table": "valuation_data_items", "ingestion_run_id": null, "transformation_version": "fundamentals_ai_context_v1", "market": "TWSE", "data_gaps": { "market_cap_deferred": true, "shares_outstanding_deferred": true, "market_cap_source_proof_required": true, "shares_outstanding_source_proof_required": true }, "artifact_only": false, "source_endpoint": "BWIBBU_d", "controlled_write": true, "transform_version": "non_tpex_valuation_controlled_writer_v1", "controlled_write_scope": "2026-05-28_2026-07-16", "fetched_or_source_date": "2026-07-14" }, "data_gaps": [], "restatement_warning": { "has_restatement": false, "reason": null, "previous_version_ref": null }, "not_investment_advice": true, "coverage_window": { "min_period": null, "max_period": null, "coverage_confidence": "medium", "row_count": 0 }, "safe_usage_notes": [ "not_investment_advice", "official_public_first_policy", "period_semantics_explicit" ], "available_tools_or_endpoints": [ { "name": "valuation_data", "path": "/v2/datasets/valuation-data" } ] } } ], "count": 50, "status": "ok"}擷取自 2026-07-20 的線上 API。
curl "https://api.twmarketdata.com/v2/datasets/valuation-data?symbol=2330" \ -H "X-API-Key: sk_live_..."| 參數 | 必填 | 型別 | 說明 |
|---|---|---|---|
symbol | 是 | string | 股票代碼,例如 2330。 |
start_date | 否 | string (YYYY-MM-DD) | 查詢起始日期。 |
end_date | 否 | string (YYYY-MM-DD) | 查詢結束日期。 |
limit | 否 | integer | 回傳筆數上限。 |
第一個呼叫:
import requests resp = requests.get( "https://api.twmarketdata.com/v2/datasets/valuation-data", params={"symbol": "2330"}, headers={"X-API-Key": "sk_live_..."},)resp.raise_for_status()print(resp.json()["rows"])帶日期區間篩選:
import requests # The full verified example — the same call with every supported filter set.resp = requests.get( "https://api.twmarketdata.com/v2/datasets/valuation-data", params={"symbol": "2330"}, headers={"X-API-Key": "sk_live_..."},)resp.raise_for_status()for row in resp.json()["rows"]: print(row)此端點為 GET /v2/datasets/valuation-data。完整機器可讀 schema(參數、認證、回應封裝)見 OpenAPI spec。