TW Market Data LogoTW Market Data

核心資料

市場與價格

TWSE / TPEx 日線、還原價格、指數與市場廣度

財務與成長

月營收、財報三表、財務指標與估值資料

籌碼與資金

三大法人與融資融券資料

公司與結構

公司與事件

公司基本資料、公告、事件、公司行動與股利

分類與結構

主題分類、指數分類與跨資料集 mapping

策略與量化

Features、Factor Data、Time Alignment 與 Screener

平台能力

API 存取

REST API、認證與第一個 request

查詢與工具

Search API、Query API、欄位清單與查詢範例

Tools / MCP

Agent workflow、MCP tools 與 OpenAPI 入口

方案價格文件觀點文章
EN儀表板

TW Market Data(TWMD)提供之歷史資料與統計,非投資建議;投資決策與風險由您自行判斷。

隱私政策|服務條款|幫助中心||EN|TW Market Data © 2026

文件總覽

DASHBOARD

儀表板定價

FOR AI AGENTS

MCP Serverllms.txt工具清單OpenAPI SpecAgent 工作流範例
Webhooks建置中

OVERVIEW

總覽快速開始認證來源政策資料分級資料血緣市場覆蓋

DATA APIS

三大法人買賣借券資料董監持股股權分散法人市場匯總增強融資融券現股當沖暫停融資融券整體融資融券匯總籌碼流向

GUIDES

如何取得財報三表如何查三大法人籌碼如何看市場狀態如何接策略・AI Agent

SDKS

Release StatusPython SDKJavaScript / TypeScript SDK

AI agent?先讀 /llms.txt 取得全站索引。

籌碼與資金

三大法人買賣

TWSE 三大法人每日買賣超與淨流量,來源為官方 T86 報表。

已驗證來源: TWSE·方案: starter·計費: 2 點·GET /v2/datasets/institutional-flow

總覽

institutional-flow 以 TWSE T86 為源,每交易日每檔股票回傳外資、投信、自營商買賣超一列;附來源角色,數字可回溯官方報表。

欄位型別說明
symbolstring股票代碼。
datestring交易日。
foreign_netnumber外資買賣超(股)。
trust_netnumber投信買賣超(股)。
dealer_netnumber自營商買賣超(股)。
source_rolestringofficial_twse_t86。

涵蓋範圍

列數11,744,999
涵蓋起訖2012-05-02 至 2026-07-17
分級已驗證

範例回應

此為本端點的真實回應。資料列位於 "rows" 之下,來源資訊如下方所示;各資料集形狀不盡相同,請以本頁為準。

{  "dataset": "institutional_flow",  "rows": [    {      "market": "TWSE",      "foreign_buy": null,      "foreign_sell": null,      "investment_trust_buy": null,      "investment_trust_sell": null,      "dealer_buy": null,      "dealer_sell": null,      "foreign_holding_ratio": null,      "institutional_participation_ratio": null,      "provider": "twse_official",      "source_role": "official_twse_t86",      "lineage": {        "row_index": 1317,        "source_hash": "f14371bed1a88a8714924ba6122d36fd11429f8663e4d4c73501ed226878c382",        "payload_date": "20260717",        "request_date": "2026-07-17",        "endpoint_name": "T86",        "source_authority": "TWSE T86"      },      "updated_at": "2026-07-17T17:34:55.593720",      "universe_class": "common_stock",      "is_common_universe": true,      "symbol": "2330",      "as_of_date": "2026-07-17",      "date": "2026-07-17",      "foreign_net_buy_sell": -44183964,      "investment_trust_net_buy_sell": 1488520,      "dealer_net_buy_sell": 2759348,      "total_institutional_net_buy_sell": -39936096    },    {      "market": "TWSE",      "foreign_buy": null,      "foreign_sell": null,      "investment_trust_buy": null,      "investment_trust_sell": null,      "dealer_buy": null,      "dealer_sell": null,      "foreign_holding_ratio": null,      "institutional_participation_ratio": null,      "provider": "twse_official",      "source_role": "official_twse_t86",      "lineage": {        "row_index": 1273,        "source_hash": "edadfac40097e48752713d46f70e7596c77b694bdf412ab096f6373c140ac106",        "payload_date": "20260716",        "request_date": "2026-07-16",        "endpoint_name": "T86",        "source_authority": "TWSE T86"      },      "updated_at": "2026-07-17T17:34:55.593720",      "universe_class": "common_stock",      "is_common_universe": true,      "symbol": "2330",      "as_of_date": "2026-07-16",      "date": "2026-07-16",      "foreign_net_buy_sell": -4214736,      "investment_trust_net_buy_sell": 528374,      "dealer_net_buy_sell": 1061380,      "total_institutional_net_buy_sell": -2624982    }  ],  "count": 50}

擷取自 2026-07-20 的線上 API。

快速開始

  1. 把你的金鑰放進 X-API-Key 標頭。
  2. 加上查詢參數(symbol、日期區間、limit)。
  3. 送出請求並讀取 rows 陣列。
curl "https://api.twmarketdata.com/v2/datasets/institutional-flow?symbol=2330&start_date=2026-06-01&end_date=2026-07-15&limit=5" \  -H "X-API-Key: sk_live_..."

篩選參數

參數必填型別說明
symbol是string股票代碼,例如 2330。
start_date否string (YYYY-MM-DD)查詢起始日期。
end_date否string (YYYY-MM-DD)查詢結束日期。
limit否integer回傳筆數上限。

Python 範例

第一個呼叫:

import requests resp = requests.get(    "https://api.twmarketdata.com/v2/datasets/institutional-flow",    params={"symbol": "2330", "limit": "5"},    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/institutional-flow",    params={"symbol": "2330", "start_date": "2026-06-01", "end_date": "2026-07-15", "limit": "5"},    headers={"X-API-Key": "sk_live_..."},)resp.raise_for_status()for row in resp.json()["rows"]:    print(row)

OpenAPI

此端點為 GET /v2/datasets/institutional-flow。完整機器可讀 schema(參數、認證、回應封裝)見 OpenAPI spec。

備註與限制

  • 部分列在上游標記 is_placeholder:true——將數值視為定案前請先檢查此旗標。

請求與回應

請求

curl "https://api.twmarketdata.com/v2/datasets/institutional-flow?symbol=2330&start_date=2026-01-01&end_date=2026-06-30&limit=5" \  -H "X-API-Key: $TWMD_API_KEY"

以 X-API-Key 標頭認證,使用儀表板發放的 sk_live_ 金鑰。

回應

JSON
{  "dataset": "institutional_flow",  "rows": [    {      "market": "TWSE",      "foreign_buy": null,      "foreign_sell": null,      "investment_trust_buy": null,      "investment_trust_sell": null,      "dealer_buy": null,      "dealer_sell": null,      "foreign_holding_ratio": null,      "institutional_participation_ratio": null,      "provider": "twse_official",      "source_role": "official_twse_t86",      "lineage": {        "row_index": 1317,        "source_hash": "f14371bed1a88a8714924ba6122d36fd11429f8663e4d4c73501ed226878c382",        "payload_date": "20260717",        "request_date": "2026-07-17",        "endpoint_name": "T86",        "source_authority": "TWSE T86"      },      "updated_at": "2026-07-17T17:34:55.593720",      "universe_class": "common_stock",      "is_common_universe": true,      "symbol": "2330",      "as_of_date": "2026-07-17",      "date": "2026-07-17",      "foreign_net_buy_sell": -44183964,      "investment_trust_net_buy_sell": 1488520,      "dealer_net_buy_sell": 2759348,      "total_institutional_net_buy_sell": -39936096    },    {      "market": "TWSE",      "foreign_buy": null,      "foreign_sell": null,      "investment_trust_buy": null,      "investment_trust_sell": null,      "dealer_buy": null,      "dealer_sell": null,      "foreign_holding_ratio": null,      "institutional_participation_ratio": null,      "provider": "twse_official",      "source_role": "official_twse_t86",      "lineage": {        "row_index": 1273,        "source_hash": "edadfac40097e48752713d46f70e7596c77b694bdf412ab096f6373c140ac106",        "payload_date": "20260716",        "request_date": "2026-07-16",        "endpoint_name": "T86",        "source_authority": "TWSE T86"      },      "updated_at": "2026-07-17T17:34:55.593720",      "universe_class": "common_stock",      "is_common_universe": true,      "symbol": "2330",      "as_of_date": "2026-07-16",      "date": "2026-07-16",      "foreign_net_buy_sell": -4214736,      "investment_trust_net_buy_sell": 528374,      "dealer_net_buy_sell": 1061380,      "total_institutional_net_buy_sell": -2624982    }  ],  "count": 50}

擷取自對此端點的真實呼叫,非手寫。

此資料集的資料列在 "rows" 之下。各資料集的信封不同,請以本頁為準,勿沿用其他頁的形狀。

本頁的分級徽章屬文件分級,並非回應欄位。