Answer
What are the limitations of the TWSE API, and how do you use the official OpenAPI?
The official TWSE OpenAPI is free, needs no API key, and returns JSON on a plain GET. Three boundaries matter in practice: most endpoints serve the latest period as a snapshot rather than a queryable history, dates are ROC-calendar strings, and the listed and OTC markets name the same fields differently. If you are willing to poll and store it yourself, it is entirely sufficient.
First, the official OpenAPI is the first-hand source, and it is free
Both the Taiwan Stock Exchange (TWSE) and the Taipei Exchange (TPEx) publish open-data APIs. No registration, no API key: an HTTP GET returns a JSON array. This is the origin of all Taiwan market data, including ours. If the official endpoint has what you need and you are happy to do the downstream work, using it directly is the sensible choice.
curl "https://openapi.twse.com.tw/v1/opendata/t187ap05_L"Boundary 1: most endpoints return the latest period, not a history range
This is the one people hit first. The listed-market monthly revenue endpoint, t187ap05_L, returns a full-market snapshot of the most recently published month — roughly a thousand rows when probed on 2026-07-31, all sharing the same reporting month — rather than a query you can point at a date range. Adding a date parameter does not change the response. Historical depth is therefore not something you query; it is something you accumulate by polling on a schedule and storing the results. If you start today, you do not have last year.
curl -s "https://openapi.twse.com.tw/v1/opendata/t187ap05_L?date=202401" | head -c 200
# identical to the call without the parameter: still the latest periodBoundary 2: ROC-calendar dates and Chinese field names
Dates come back looking like 1150730, meaning the 115th year of the ROC era, 30 July — 2026-07-30 in the Gregorian calendar, which you convert yourself. Field names on the TWSE side are largely Chinese strings, so your code either uses Chinese keys or carries a mapping layer. Numeric values arrive as strings and need casting, and some fields use a full-width dash to mean "no value". All of it is workable; it is simply work you repeat for every endpoint you add.
Boundary 3: listed and OTC are two separate APIs with different field names
The same logical dataset lives on openapi.twse.com.tw for listed companies and on www.tpex.org.tw for OTC ones, under different naming conventions. Company profiles are the clearest example: the listed endpoint t187ap03_L uses Chinese field names, while the OTC endpoint mopsfin_t187ap03_O uses English ones such as SecuritiesCompanyCode and Chairman. Whole-market analysis therefore needs a cross-market field mapping that you own and keep current as the official formats evolve.
Quotas and formats: follow the official announcements
The endpoints do not advertise explicit rate-limit headers, so the authoritative answer on request quotas, terms of use and format changes is whatever TWSE and TPEx publish. The practical approach is to throttle yourself, add retries and caching, and avoid assuming you can poll at high frequency.
When it is worth moving to a traceable API
The official endpoints fit well when you want current data, at modest volume, and are happy to run the fetching and cleaning. The build-it-yourself cost starts to outweigh the saving when you need multi-year history for backtests, cross-dataset questions (prices by revenue by institutional flows) answered in one query, per-row lineage and knowledge dates for point-in-time validation, or an AI agent that can discover the endpoints on its own.
# TW Market Data: one schema, cross-dataset, with a date range
curl "https://api.twmarketdata.com/v2/datasets/monthly-revenue?symbol=2330" \
-H "X-API-Key: $TWMD_API_KEY"Related