AI agent?先讀 /llms.txt 取得全站索引。
總體經濟
世界銀行發展指標——直接取自世界銀行的長期跨國總經序列。
GET /v2/datasets/macro-worldbankmacro-worldbank 針對世界銀行發展指標,每個指標每個年度回傳一列。此為國際來源的總經脈絡,非 TWSE 資料源;每列於 lineage 標明世界銀行指標代碼,數值可與世界銀行原始序列對帳。
| 欄位 | 型別 | 說明 |
|---|---|---|
indicator | string | 世界銀行指標代碼(如 NY.GDP.MKTP.CD)。 |
country | string | ISO 國家/地區代碼。 |
year | integer | 資料年度。 |
value | number | 當年度指標值。 |
source_role | string | 正規來源角色(worldbank_indicator)。 |
lineage | object | 數值所屬的上游世界銀行指標與發布。 |
| 列數 | 1,362,467 |
| 涵蓋起訖 | 1960 至 2025 |
| 分級 | 已驗證 |
TODO —— 尚未擷取到此資料集的真實回應(需要有權限的 API 金鑰,或其必填參數尚未確認)。寧可留白,也不顯示未經實測的範例。
curl "https://api.twmarketdata.com/v2/datasets/macro-worldbank?country=TWN" \ -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/macro-worldbank", params={"country": "TWN"}, headers={"X-API-Key": "sk_live_..."},)resp.raise_for_status()print(resp.json())帶日期區間篩選:
import requests # The full verified example — the same call with every supported filter set.resp = requests.get( "https://api.twmarketdata.com/v2/datasets/macro-worldbank", params={"country": "TWN"}, headers={"X-API-Key": "sk_live_..."},)resp.raise_for_status()print(resp.json())此端點為 GET /v2/datasets/macro-worldbank。完整機器可讀 schema(參數、認證、回應封裝)見 OpenAPI spec。