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

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.

Guide

How to wire a strategy / AI agent

Let an agent use TW Market Data without hallucinating — read the index, trust empty results, know the gaps.

Step 1 — Read the index first

Point the agent at /llms.txt — the machine-readable index of datasets, rules and OpenAPI links. Fetch it once, then work only from the dataset ids it lists.

curl "https://twmarketdata.com/llms.txt"

Step 2 — Call datasets with your key

Every data call carries X-API-Key. The envelope is { rows / items, count }; read count before touching the rows.

Step 3 — Trust an empty result

When a range has no data, the API returns an honest empty result — not an error, not a guess. This is a real response:

{  "dataset": "institutional_flow",  "rows": [],  "count": 0}

The rule for the agent

  • count == 0 means CONFIRMED no data in range. The agent must say "no data in that range" — never invent a number to fill the gap.
  • This is the single most important anti-hallucination check: read count, then decide.

Step 4 — Know the permanent gaps

Some data is deliberately not offered (copyright, no source). A /meta/boundaries endpoint that declares these permanent gaps is in preview and not live yet — until it ships, treat the not_available list in /llms.txt as the source of truth for what is intentionally absent.

Disclaimer

TW Market Data provides data only — not investment advice, not stock recommendations, not trading signals. An agent built on it must not present its output as any of those.

English is a semantic rewrite, not a machine translation.

On this page

  • Step 1 — Read the index first
  • Step 2 — Call datasets with your key
  • Step 3 — Trust an empty result
  • The rule for the agent
  • Step 4 — Know the permanent gaps
  • Disclaimer