Building an AI agent? Start with /llms.txt for the full site index.
Capital Flows
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.
GET /v2/datasets/institutional-flow-market-aggregateinstitutional-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.
| Field | Type | Description |
|---|---|---|
date | string | Trading date. |
foreign_net | number | Market-wide foreign investor net (shares). |
trust_net | number | Market-wide investment-trust net (shares). |
dealer_net | number | Market-wide dealer net (shares). |
total_net | number | Combined three-investor net (shares). |
source_role | string | Canonical source role (derived_twse_institutional_aggregate). |
| Rows | 11,744,999 |
| Window | 2012-05-02 – 2026-07-17 |
| Grade | Derived |
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.
curl "https://api.twmarketdata.com/v2/datasets/institutional-flow-market-aggregate?symbol=2330" \ -H "X-API-Key: sk_live_..."| Parameter | Required | Type | Description |
|---|---|---|---|
symbol | Yes | string | Ticker, e.g. 2330. |
start_date | No | string (YYYY-MM-DD) | Start of the query range. |
end_date | No | string (YYYY-MM-DD) | End of the query range. |
limit | No | integer | Maximum rows to return. |
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)This endpoint is GET /v2/datasets/institutional-flow-market-aggregate. The full machine-readable schema (parameters, security, response envelope) lives in the OpenAPI spec.