AI agent?先讀 /llms.txt 取得全站索引。
Overview
一把金鑰放進標頭,就能呼叫所有資料端點。
每個請求都帶 X-API-Key 標頭。金鑰在 儀表板 自己建立、輪替、撤銷,不用聯絡我們。
curl "https://api.twmarketdata.com/v2/datasets/monthly-revenue?symbol=2330" \
-H "X-API-Key: $TWMD_API_KEY"401 missing_api_key — 金鑰沒帶或無效(免 key 五檔 2330/2317/2454/0050/2603 除外,直接回 200)。402 not_entitled_for_dataset — 你的方案沒有這個資料集的權限(付費牆)。429 — 超出配額 / 速率限制。402 的回應不只是一句「你的方案沒有」:body 會告訴你哪個方案涵蓋它、你現在這個方案讀得到哪些資料集、以及一行不用金鑰就會回資料的範例。
{
"error": "not_entitled_for_dataset",
"message": "income-statement 不在你目前的方案裡,pro 方案涵蓋它。免費層目前可讀 3 個資料集。下面這行不用金鑰也拿得到資料。",
"needs_plan": "pro",
"your_free_plan_includes": [],
"free_plan_dataset_count": 3,
"try_this_example": "curl \"https://api.twmarketdata.com/v2/datasets/twse-daily-price?symbol=2330&limit=1\"",
"upgrade_url": "https://twmarketdata.com/pricing",
"docs_url": "https://twmarketdata.com/docs/api-reference/errors"
}下一步 → 來源政策