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

This documentation page is currently available in Chinese only; English versions are coming soon.

文件 · Webhooks

Webhooks(Phase A)

當發生一個你也能從 /freshness 拉到的資料事件時,我們會把 同一份凍結 payload 推送到你的 HTTPS 端點——推即是拉,零雙重真相。投遞以 Standard Webhooks 簽章,失敗會退避重試,並有 SSRF 防護。

語義:at-least-once、不保序

  • 同一事件可能送達不只一次(重試/部署中)。請用 webhook-id 去重,不要假設 exactly-once。
  • 不保證依 occurred_at 順序抵達;需要順序請自行以 occurred_at 排序。

請求與簽章 headers

POST,Content-Type: application/json。 三個 Standard Webhooks headers:

  • webhook-id — 事件穩定 id,用它去重
  • webhook-timestamp — unix 秒;驗簽有 5 分鐘容差
  • webhook-signature — v1,<base64 HMAC-SHA256>,簽 {id}.{timestamp}.{body}

Body envelope(路由 metadata + 凍結 payload 放在 data):

{
  "id": "3f2b0c9e-…",
  "type": "revenue.announced",
  "occurred_at": "2026-07-10T09:00:00Z",
  "dataset": "monthly-revenue",
  "symbol": "2330",
  "schema_ver": 1,
  "data": { "…frozen event payload, verbatim…": true }
}

驗簽——用官方庫,別自己寫

簽章是標準 HMAC-SHA256。用官方庫驗,篡改的 body / 錯的 secret / 過期 timestamp 都會被擋。可直接執行的範例:

Node:examples/webhooks/verify_signature.mjs(npm i standardwebhooks)· Python:examples/webhooks/verify_signature.py(pip install standardwebhooks)

import { Webhook } from "standardwebhooks";

const wh = new Webhook(process.env.WEBHOOK_SIGNING_SECRET); // whsec_…
// Pass the RAW request body (bytes as received) — re-serializing changes the signed bytes.
const event = wh.verify(rawRequestBody, {
  "webhook-id": req.headers["webhook-id"],
  "webhook-timestamp": req.headers["webhook-timestamp"],
  "webhook-signature": req.headers["webhook-signature"],
}); // throws on tampered body / wrong secret / stale timestamp
from standardwebhooks import Webhook

wh = Webhook(os.environ["WEBHOOK_SIGNING_SECRET"])  # whsec_…
event = wh.verify(raw_request_body, {
    "webhook-id": headers["webhook-id"],
    "webhook-timestamp": headers["webhook-timestamp"],
    "webhook-signature": headers["webhook-signature"],
})  # raises on any mismatch

三個事件(schema_ver = 1)

所有 payload 都帶 schema_ver: 1 與 not_investment_advice: true;結構凍結。

revenue.announced — 月營收公告

{
  "schema_ver": 1,
  "symbol": "2330",
  "revenue_month": "2026-06",
  "revenue": 331109,
  "unit": { "currency": "TWD", "scale": "thousand_twd" },
  "data_as_of": "2026-07-10",
  "not_investment_advice": true
}

filing.announced — 財報公告

statement 為 income | balance | cash_flow。

{
  "schema_ver": 1,
  "symbol": "2330",
  "statement": "income",
  "fiscal_period": "2026-Q1",
  "report_date": "2026-05-15",
  "data_as_of": "2026-05-15",
  "not_investment_advice": true
}

catalog.dataset_listed — 新資料集上架

此事件沒有 symbol,因此只會匹配「未設 symbol filter」的訂閱。

{
  "schema_ver": 1,
  "dataset": "derivatives-market",
  "exposure_status": "public_sellable",
  "reconciliation_badge": "green",
  "not_investment_advice": true
}

重試、退避、自動停用

失敗(非 2xx、逾時、連線錯誤、遇到 redirect)以指數退避 + 抖動重試,24 小時內最多 8 次。用盡後端點會被自動停用並 email 通知帳號;修好後可在後台重新啟用。每次嘗試逐筆記錄。

端點規則(SSRF:建立與每次投遞都檢查)

  • 僅 HTTPS。
  • host 必須解析到公網 IP。私網/loopback/link-local/CGNAT 及雲 metadata(169.254.169.254 / fd00:ec2::254) 一律拒絕(含 IPv4-mapped / 6to4 / NAT64)。
  • 不跟隨 redirect——3xx 視為投遞失敗。
  • 僅預設埠;URL 不得含帳密;payload 大小上限。

簽章密鑰:揭示與輪替

每個端點有 whsec_… 簽章密鑰,加密儲存(與 API key 相同的 key-reveal 鏈),建立時完整顯示一次,其餘僅能經節流的 reveal 端點取得。可隨時輪替——新密鑰回傳一次,舊的立即停止簽章。

完整參考:docs/WEBHOOKS.md · 返回文件入口