TW Market Data LogoTW Market Data

Facts & statistics

Market facts

Long-run statistics for Taiwan equities, each with its sample period and as_of

Seasonality

Monthly return distributions and hit rates, with sample sizes

Institutional flow

Seasonality in the breadth of institutional net buying

Limit events

How often limit moves happen, and how concentrated they are

Delisting

Delisting counts and survival spans — the basis for avoiding survivorship bias

Rule changes

A timeline of trading-rule changes — the premise for reading historical data

Data & exploration

Dataset catalogue

Every dataset, its coverage, and how often it updates

Playground

Call the API from the browser, without a key

Market today

Today's market at a glance

Stock analysis

The entry point for looking at one instrument

Market heat map

The whole market in one picture — area is market cap, colour is revenue growth

Market calendar

Statutory disclosure deadlines — the day a figure may legally first be known

Platform capabilities

Product overview

What TWMD provides, and who it is built for

Verifiable proof

Signed checkpoints and per-row inclusion proofs

Data quality

Reconciliation, gap handling, and quality status

Methodology

How the figures are computed, and on what basis

Auditable execution

Tie a trading decision back to the data it saw

Connect your broker

Bring TWMD into an existing order and research workflow

Developers

Documentation

API reference, dataset pages, and integration guides

Quick start

Authentication and your first request

Integrate by role

Separate paths for quant research, data engineering, and app development

Connect over MCP

Point an agent straight at TWMD

MCP registry

The published MCP tool list and its signed manifest

Webhooks

Have your system told when data updates

Learn

Blog

Long-form writing on data, method, and market structure

Answers

Specific answers to specific questions, with sources

Topics

Industry chains and thematic relationships

Help centre

Account, billing, and usage questions

Glossary

Definitions for Taiwan-market and data terms

Compare & status

Why TWMD

A point-by-point comparison with FinMind and TEJ

Migrate from FinMind

Field mapping and migration steps

Migrate from FinLab

Field mapping and migration steps

Migrate from TEJ

Field mapping and migration steps

Status

Service availability and incident history

Security & trust

Trust centre

What we claim, and the limits on each claim

Security

Architecture, access control, and incident handling

Security facts

The items you can verify from outside

Security evidence

SBOM, ASVS mapping and threat model — including the three controls we do not meet.

Self-assessment

Item-by-item answers for a procurement questionnaire

Compliance & standards

Compliance mapping

Evidence primitives mapped onto FSB, IOSCO, and SR 26-2

Standards & interop

Term-by-term mapping onto published standards, and where it does not map

Provenance & C2PA

A machine-readable origin graph, fetchable without a key

Licensing

How the data may be used and redistributed

Adoption

Evaluate

Seven checks you can run yourself, without an account

Talk to sales

Enterprise plans, quotas, and contract detail

Pricing
中文Sign inSign up
TW Market Data

Taiwan market-data infrastructure, built for AI agents and quantitative workflows.

Status unknown
© 2026 TW Market Data

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·
  • Cookie Policy·
  • Acceptable Use Policy·
  • Data Sources & Licensing·
  • Legal (all documents)
中文

AI Agent

  • MCP Server
  • Skills
  • Tool manifest
  • Agent workflow examples
  • Agent benchmark
  • llms.txt
  • OpenAPI spec

Security

  • Security overview
  • Verifiable data
  • Trust Center
  • Standards & Interop
  • Regulatory mapping

Product

  • Datasets
  • Topics
  • Market facts
  • Documentation
  • Integration runbooks
  • Playground (no signup)
  • Free tier
  • Solutions

Company

  • About TWMD
  • Blog
  • Help centre
  • Pricing

Documentation

DASHBOARD

DashboardPricing

FOR AI AGENTS

MCP ServerSkillsllms.txtTool manifestOpenAPI SpecAgent workflow examples

OVERVIEW

OverviewQuick startAuthenticationSource policyData gradesData lineageMarket coverage

DATA APIS

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.

籌碼與資金

融資融券

提供 TWSE-only private beta 融資融券資料,適合用於籌碼風險監控與市場擁擠度觀察。

This documentation page is currently available in Chinese only; English versions are coming soon.
GET/v2/datasets/margin-short

Overview

融資融券 API 目前以 TWSE-only private beta 方式提供,聚焦 official-first 的信用交易欄位。

文件必須保留 source_lineage、data_gaps 與 not_investment_advice,且不得把此資料說成 TPEx/full-market 或已啟用 daily write cron。

  • 監控融資融券餘額變化。
  • 建立信用交易風險濾網。
  • 與法人買賣資料做交叉分析。

Coverage

InstrumentsStart yearUpdate timingIncludes delisted
Not yet available (coming)Not yet available (coming)Not yet available (coming)coming

Figures are measured from the DB; unlisted fields defer to docs coverage (coming) — we don't fabricate cell by cell.

Request

使用此 endpoint 時,symbol 為必要參數,並建議明確指定 market=TWSE。

Query Parameters

欄位型別Required說明
symbolstringyes股票代碼;beta 相容請求參數。
marketstringno建議指定 TWSE;本頁不宣稱 TPEx 支援。
start_datestringno查詢起始日期(YYYY-MM-DD)。
end_datestringno查詢結束日期(YYYY-MM-DD)。
limitintegerno回傳筆數。

Response Shape

回應固定為 dataset、rows、count,加上 meta;欄位需保留 source_lineage、data_gaps 與 not_investment_advice。

{
"dataset": "margin_short",
"rows": [
{
"ticker": "0050",
"market": "TWSE",
"trade_date": "2026-05-28",
"margin_purchase_buy": 15234,
"margin_purchase_sell": 14820,
"margin_purchase_balance": 285004,
"short_sale_buy": 3120,
"short_sale_sell": 3388,
"short_sale_balance": 41882,
"source_provider": "twse_official",
"source_role": "official_twse_mi_margn",
"source_lineage": {
"provider": "twse_official",
"family": "official_twse_mi_margn"
},
"data_gaps": [],
"not_investment_advice": true,
"legacy_aliases": {
"symbol": "0050"
}
}
],
"count": 1,
"meta": {
"plan": "pro",
"row_limit": 3,
"is_limited": false
}
}

Field 說明

欄位路徑型別說明
rows[].tickerstring標的代碼。
rows[].marketstring市場別;目前網站僅宣稱 TWSE。
rows[].trade_datestring交易日期(YYYY-MM-DD)。
rows[].margin_purchase_buynumber|null融資買進。
rows[].margin_purchase_sellnumber|null融資賣出。
rows[].margin_purchase_balancenumber|null融資餘額。
rows[].short_sale_buynumber|null融券買進(回補)。
rows[].short_sale_sellnumber|null融券賣出。
rows[].short_sale_balancenumber|null融券餘額。
rows[].source_providerstring來源提供者。
rows[].source_rolestring來源角色。
rows[].source_lineageobject來源血緣;文件與網站文案必須保留。
rows[].data_gapsarray資料缺口訊號。
rows[].not_investment_adviceboolean非投資建議宣告。
countinteger回傳資料筆數。

Usage Notes / 使用建議

  • 目前 coverage 為 2026-03-10..2026-05-28;實際覆蓋筆數與涵蓋股票數詳見 /datasets。
  • TWSE-only、private beta、no TPEx claim。
  • official-first 與 source_lineage/data_gaps 必須保留。
  • ratio tolerance 為 1e-6。
  • daily write cron not enabled。
  • 若需法人淨買賣超補充資料,請搭配 `/v2/datasets/institutional-flow`。

Limitations & notes

  • Coverage is not the full market or full history; the actual range is defined by the coverage table above and the data_gaps in the response.
  • Missing data is flagged honestly — we don't fill gaps with estimated values.
  • The platform focuses on daily-frequency and fundamental data; it does not provide real-time quotes, intraday bars, or cryptocurrencies.
  • TWSE is the verified baseline; TPEx history depth and adjusted prices are currently beta / deferred, flagged per dataset.
  • Queries do not support an as_of parameter (roadmap). For point-in-time, filter on each row's knowledge_date, which is set conservatively to the statutory filing deadline. Daily prices do not carry that column.

Plan Requirement

  • Private beta access
  • Developer
  • Pro
  • Enterprise

此 API 屬於 TW Market Data 資料集目錄。 查看資料集總覽

請求與回應

Request example

curl --request GET   --url "https://api.twmarketdata.com/v2/datasets/margin-short?symbol=0050&market=TWSE&start_date=2026-03-10&end_date=2026-05-28&limit=3"   --header "X-API-Key: your_api_key_here"

Status codes

成功回傳融資融券資料

JSON
{  "dataset": "margin_short",  "rows": [    {      "ticker": "0050",      "market": "TWSE",      "trade_date": "2026-05-28",      "margin_purchase_buy": 15234,      "margin_purchase_sell": 14820,      "margin_purchase_balance": 285004,      "short_sale_buy": 3120,      "short_sale_sell": 3388,      "short_sale_balance": 41882,      "source_provider": "twse_official",      "source_role": "official_twse_mi_margn",      "source_lineage": {        "provider": "twse_official",        "family": "official_twse_mi_margn"      },      "data_gaps": [],      "not_investment_advice": true,      "legacy_aliases": {        "symbol": "0050"      }    }  ],  "count": 1,  "meta": {    "plan": "pro",    "row_limit": 3,    "is_limited": false  }}