TW Market Data LogoTW Market Data

Core data

Market & prices

TWSE / TPEx daily bars, adjusted prices, indices, and market breadth

Financials & growth

Monthly revenue, the three financial statements, financial metrics, and valuation data

Flows & positioning

Institutional investors and margin & short-selling data

Company & structure

Company & events

Company profiles, disclosures, events, corporate actions, and dividends

Taxonomy & structure

Theme taxonomy, index classification, and cross-dataset mapping

Strategy & quant

Features, factor data, time alignment, and screener

Platform capabilities

API access

REST API, authentication, and your first request

Query & tools

Search API, Query API, field lists, and query examples

Tools / MCP

Agent workflows, MCP tools, and the OpenAPI entry point

PricingDocsBlog
中文Dashboard

TW Market Data (TWMD) provides historical data and statistics, not investment advice; investment decisions and their risks are your own.

Privacy Policy|Terms of Service|Help Center||中文|TW Market Data © 2026

Documentation

DASHBOARD

DashboardPricing

FOR AI AGENTS

MCP Serverllms.txtTool manifestOpenAPI SpecAgent workflow examples
WebhooksBuilding

OVERVIEW

OverviewQuick startAuthenticationSource policyData gradesData lineageMarket coverage

DATA APIS

Institutional flowSecurities lendingInsider & director holdingsOwnership distributionInstitutional flow (market aggregate)Enhanced margin & shortDay-trading suspensionMargin & shortTotal margin & shortChip flows

GUIDES

How to get the 3 financial statementsHow to read institutional flowsHow to check market statusHow to wire a strategy / AI agent

SDKS

Release statusPython SDKJavaScript / TypeScript SDK

Building an AI agent? Start with /llms.txt for the full site index.

Capital Flows

Institutional flow (market aggregate)

Market-wide net buy/sell by the three major institutional investor groups per trading day, aggregated across all listed stocks from the official T86 report.

DerivedSource: TWSE·Plan: pro·Cost: 2 credits·GET /v2/datasets/institutional-flow-market-aggregate

Overview

institutional-flow-market-aggregate is a derived dataset: it sums the per-stock foreign, investment-trust and dealer flows from the official TWSE T86 report into one market-wide row per trading day, so an agent can read the whole-market institutional stance without fetching and summing every stock. The lineage block points back to the underlying T86 source so the aggregate stays auditable.

FieldTypeDescription
datestringTrading date.
foreign_netnumberMarket-wide foreign investor net (shares).
trust_netnumberMarket-wide investment-trust net (shares).
dealer_netnumberMarket-wide dealer net (shares).
total_netnumberCombined three-investor net (shares).
source_rolestringCanonical source role (derived_twse_institutional_aggregate).

Coverage

Rows11,744,999
Window2012-05-02 – 2026-07-17
GradeDerived

Example response

A real response from this endpoint. Rows are returned under "items", and provenance is carried in the shape shown below — it is not identical across datasets, so read this page's rather than assuming another's.

{  "dataset_id": "institutional-flow-market-aggregate",  "row_count": 50,  "status": "ok",  "items": [    {      "generated_at": "2026-07-20T18:33:56Z",      "trade_date": "2026-07-17",      "market": "TWSE",      "foreign_net_buy": -1272145532,      "investment_trust_net_buy": 29630849,      "dealer_net_buy": -3197999349,      "institutional_net_buy_total": -4440514032,      "constituent_row_count": 1337,      "source_lineage": {        "provider": "twse_t86",        "source_role": "official_twse_t86",        "source_table": "institutional_flow_items",        "derived_from_dataset": "institutional_flow",        "derivation_method": "group_by_trade_date_market_sum",        "derived_from_official_twse_t86_constituents": true      },      "data_gaps": [],      "coverage_window": {        "min_trade_date": "2026-05-04",        "max_trade_date": "2026-07-17"      },      "safe_usage_notes": [        "aggregate_not_single_stock_signal",        "do_not_forward_fill_missing_chip_days_without_policy",        "source_specific_methodology_may_change"      ],      "not_investment_advice": true,      "available_tools_or_endpoints": [        {          "name": "institutional_flow",          "path": "/v2/datasets/institutional-flow"        },        {          "name": "institutional_flow_market_aggregate",          "path": "/v2/datasets/institutional-flow-market-aggregate"        }      ],      "db_write_executed": false    },    {      "generated_at": "2026-07-20T18:33:56Z",      "trade_date": "2026-07-16",      "market": "TWSE",      "foreign_net_buy": 3387389,      "investment_trust_net_buy": -23517807,      "dealer_net_buy": -313350914,      "institutional_net_buy_total": -333481332,      "constituent_row_count": 1327,      "source_lineage": {        "provider": "twse_t86",        "source_role": "official_twse_t86",        "source_table": "institutional_flow_items",        "derived_from_dataset": "institutional_flow",        "derivation_method": "group_by_trade_date_market_sum",        "derived_from_official_twse_t86_constituents": true      },      "data_gaps": [],      "coverage_window": {        "min_trade_date": "2026-05-04",        "max_trade_date": "2026-07-17"      },      "safe_usage_notes": [        "aggregate_not_single_stock_signal",        "do_not_forward_fill_missing_chip_days_without_policy",        "source_specific_methodology_may_change"      ],      "not_investment_advice": true,      "available_tools_or_endpoints": [        {          "name": "institutional_flow",          "path": "/v2/datasets/institutional-flow"        },        {          "name": "institutional_flow_market_aggregate",          "path": "/v2/datasets/institutional-flow-market-aggregate"        }      ],      "db_write_executed": false    }  ],  "safe_usage_notes": [    "not_investment_advice",    "twse_only_scope",    "aggregate_not_single_stock_signal"  ]}

Captured from the live API on 2026-07-20.

Getting started

  1. Put your key in the X-API-Key header.
  2. Add query parameters (symbol, date range, limit).
  3. Send the request and read the items array.
curl "https://api.twmarketdata.com/v2/datasets/institutional-flow-market-aggregate?symbol=2330" \  -H "X-API-Key: sk_live_..."

Filtering

ParameterRequiredTypeDescription
symbolYesstringTicker, e.g. 2330.
start_dateNostring (YYYY-MM-DD)Start of the query range.
end_dateNostring (YYYY-MM-DD)End of the query range.
limitNointegerMaximum rows to return.

Python

A first call:

import requests resp = requests.get(    "https://api.twmarketdata.com/v2/datasets/institutional-flow-market-aggregate",    params={"symbol": "2330"},    headers={"X-API-Key": "sk_live_..."},)resp.raise_for_status()print(resp.json()["items"])

With a date-range filter:

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-market-aggregate",    params={"symbol": "2330"},    headers={"X-API-Key": "sk_live_..."},)resp.raise_for_status()for row in resp.json()["items"]:    print(row)

OpenAPI

This endpoint is GET /v2/datasets/institutional-flow-market-aggregate. The full machine-readable schema (parameters, security, response envelope) lives in the OpenAPI spec.

Notes & limitations

  • Derived, not disclosed: this is a market-wide roll-up computed from the per-stock T86 flows, so it inherits any upstream is_placeholder rows — reconcile against institutional-flow when a single day looks off.

Request & Response

Request

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

Authenticate with the X-API-Key header, using a sk_live_ key issued in the dashboard.

Response

JSON
{  "dataset_id": "institutional-flow-market-aggregate",  "row_count": 50,  "status": "ok",  "items": [    {      "generated_at": "2026-07-20T18:33:56Z",      "trade_date": "2026-07-17",      "market": "TWSE",      "foreign_net_buy": -1272145532,      "investment_trust_net_buy": 29630849,      "dealer_net_buy": -3197999349,      "institutional_net_buy_total": -4440514032,      "constituent_row_count": 1337,      "source_lineage": {        "provider": "twse_t86",        "source_role": "official_twse_t86",        "source_table": "institutional_flow_items",        "derived_from_dataset": "institutional_flow",        "derivation_method": "group_by_trade_date_market_sum",        "derived_from_official_twse_t86_constituents": true      },      "data_gaps": [],      "coverage_window": {        "min_trade_date": "2026-05-04",        "max_trade_date": "2026-07-17"      },      "safe_usage_notes": [        "aggregate_not_single_stock_signal",        "do_not_forward_fill_missing_chip_days_without_policy",        "source_specific_methodology_may_change"      ],      "not_investment_advice": true,      "available_tools_or_endpoints": [        {          "name": "institutional_flow",          "path": "/v2/datasets/institutional-flow"        },        {          "name": "institutional_flow_market_aggregate",          "path": "/v2/datasets/institutional-flow-market-aggregate"        }      ],      "db_write_executed": false    },    {      "generated_at": "2026-07-20T18:33:56Z",      "trade_date": "2026-07-16",      "market": "TWSE",      "foreign_net_buy": 3387389,      "investment_trust_net_buy": -23517807,      "dealer_net_buy": -313350914,      "institutional_net_buy_total": -333481332,      "constituent_row_count": 1327,      "source_lineage": {        "provider": "twse_t86",        "source_role": "official_twse_t86",        "source_table": "institutional_flow_items",        "derived_from_dataset": "institutional_flow",        "derivation_method": "group_by_trade_date_market_sum",        "derived_from_official_twse_t86_constituents": true      },      "data_gaps": [],      "coverage_window": {        "min_trade_date": "2026-05-04",        "max_trade_date": "2026-07-17"      },      "safe_usage_notes": [        "aggregate_not_single_stock_signal",        "do_not_forward_fill_missing_chip_days_without_policy",        "source_specific_methodology_may_change"      ],      "not_investment_advice": true,      "available_tools_or_endpoints": [        {          "name": "institutional_flow",          "path": "/v2/datasets/institutional-flow"        },        {          "name": "institutional_flow_market_aggregate",          "path": "/v2/datasets/institutional-flow-market-aggregate"        }      ],      "db_write_executed": false    }  ],  "safe_usage_notes": [    "not_investment_advice",    "twse_only_scope",    "aggregate_not_single_stock_signal"  ]}

Captured from a real call to this endpoint — not written by hand.

This dataset returns its rows under "items". The envelope differs between datasets, so read this one rather than reusing another page's shape.

The grade badge on this page is a documentation classification, not a response field.