Answer

What is STOCK_DAY_ALL, and how do you use it?

STOCK_DAY_ALL is the Taiwan Stock Exchange's open-data endpoint for one trading day of the entire listed market — open, high, low, close, volume and trade count for every listed name, from a single unauthenticated GET returning a JSON array. It answered with 1,373 rows when probed on 2026-08-01. Three things are worth knowing first: every value is a string, including the numbers; dates are ROC-calendar strings; and it serves only the latest day, with no parameter for a history range.

What the endpoint is

If what you want is today's closing prices for the whole market, this is the shortest path to them — no per-symbol loop, one request covering the entire listed market. It belongs to the TWSE exchangeReport family and returns a JSON array whose elements are one stock's quote for the day.

curl "https://openapi.twse.com.tw/v1/exchangeReport/STOCK_DAY_ALL"

The fields it actually returns

These key names are copied from a real response on 2026-08-01, not paraphrased from documentation. Note that every value is a JSON string, numeric fields included — arithmetic on them without casting concatenates strings instead of adding numbers.

  • Date — the trading day as an ROC-calendar string; 1150731 means 2026-07-31 (the first three digits are the ROC year)
  • Code — the ticker; lengths of 4, 5 and 6 characters were all observed, so do not assume four
  • Name — the security name, in Chinese
  • OpeningPrice / HighestPrice / LowestPrice / ClosingPrice — the OHLC values, as strings
  • TradeVolume — volume in SHARES, not lots
  • TradeValue — turnover value
  • Transaction — the number of trades
  • Change — the day's change, a signed four-decimal string such as 1.1100 or -1.0500
import requests

rows = requests.get(
    "https://openapi.twse.com.tw/v1/exchangeReport/STOCK_DAY_ALL", timeout=30
).json()

def roc_to_iso(d):  # "1150731" -> "2026-07-31"
    return f"{int(d[:3]) + 1911:04d}-{d[3:5]}-{d[5:]}"

parsed = [
    {
        "date": roc_to_iso(r["Date"]),
        "symbol": r["Code"],
        "close": float(r["ClosingPrice"]),
        "volume_shares": int(r["TradeVolume"]),
        "change": float(r["Change"]),
    }
    for r in rows
]
print(len(parsed), parsed[0])

Its limits

  • One day only, no history range: all 1,373 rows probed on 2026-08-01 carried the same trading date. Adding ?date=20240102 returned a byte-identical body (matching md5), so the parameter is not honoured — building a multi-year series means fetching and storing it yourself, every day.
  • ROC-calendar dates: 1150731 has to be converted to a Gregorian date; comparing it as a number will not behave.
  • Everything is a string: prices and volumes included, so cast explicitly when parsing.
  • No delisted names: only currently listed securities appear, so you cannot reconstruct the market as it stood on an earlier date.
  • Listed market only: the OTC market is a separate TPEx endpoint with different field names, so cross-market work needs a mapping layer you maintain.
  • Quotas and formats follow the official announcements: no rate limit is stated in the response itself.

When you need history, adjusted prices, or delisted names

The official endpoint is free and authoritative, and for today's snapshot it is enough on its own. What usually forces a change is one of three needs: years of history, delisted names included, or one field vocabulary across both markets. TW Market Data serves TWSE daily prices from 2004, roughly 5.2 million rows, keeping the full price history of 311 names that have stopped trading (262 of them with an official delisting date), with listed and OTC sharing one schema, dates already Gregorian and numbers already typed.

curl "https://api.twmarketdata.com/v2/datasets/twse-daily-price?symbol=2330&limit=5"

Related