Skip to content
Aggre Docs

Loading…

Console

API reference

Taiwan equities

TWSE and TPEx securities, daily closes, valuation, institutional and margin data, revenue, statements and indices.

Taiwan listed (TWSE) and OTC (TPEx) after-hours data. See the Taiwan equities guide.

On this page:

Taiwan listed and OTC securities#

GET /v1/finance/equities_tw/securities

The catalogue of TWSE and TPEx securities, ordered by security_id. q matches a code prefix or a name substring (at most 20 characters; %, _ and \ are literal). Every response carries meta.attribution ([{source_id, credit}]): whoever shows a row shows its credit. the Taiwan equities guide.

Parameters

NameInRequiredTypeDescription
marketquerynoTWSE | TPEXOnly this exchange.
qquerynostringCode prefix or name substring.
industry_codequerynostring, pattern ^[0-9]{2}$Two-digit industry code, e.g. 24.
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–1000, default 100Rows per page.

Example

bash
curl -s "https://api.aggre.org/v1/finance/equities_tw/securities?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema equities_tw_securities.

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

Daily close of Taiwan securities#

GET /v1/finance/equities_tw/daily_close

Open, high, low, close, volume and value of a trading day. Either security_id (one security's history) or date (every security of the day), not both. Every response carries meta.attribution ([{source_id, credit}]): whoever shows a row shows its credit. the Taiwan equities guide.

Parameters

NameInRequiredTypeDescription
security_idquerynostring, pattern ^(TWSE|TPEX):[0-9A-Z]+$One security's history, e.g. TWSE:2330. Give this or date.
datequerynostring, dateEvery security of this trading day, YYYY-MM-DD. Give this or security_id.
marketquerynoTWSE | TPEXNarrows a date query to one exchange.
fromquerynostring, dateFirst trading day (inclusive) of a history.
toquerynostring, dateLast trading day (exclusive) of a history; must be after from.
orderquerynoasc | descSort direction (default: newest first for a history, security_id order for a day).
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–1000, default 100Rows per page.

Example

bash
curl -s "https://api.aggre.org/v1/finance/equities_tw/daily_close?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema equities_tw_daily_close.

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

Daily valuation ratios of Taiwan securities#

GET /v1/finance/equities_tw/valuation_daily

P/E, dividend yield and P/B of a trading day. Either security_id (one security's history) or date (every security of the day), not both. Every response carries meta.attribution ([{source_id, credit}]): whoever shows a row shows its credit. the Taiwan equities guide.

Parameters

NameInRequiredTypeDescription
security_idquerynostring, pattern ^(TWSE|TPEX):[0-9A-Z]+$One security's history, e.g. TWSE:2330. Give this or date.
datequerynostring, dateEvery security of this trading day, YYYY-MM-DD. Give this or security_id.
marketquerynoTWSE | TPEXNarrows a date query to one exchange.
fromquerynostring, dateFirst trading day (inclusive) of a history.
toquerynostring, dateLast trading day (exclusive) of a history; must be after from.
orderquerynoasc | descSort direction (default: newest first for a history, security_id order for a day).
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–1000, default 100Rows per page.

Example

bash
curl -s "https://api.aggre.org/v1/finance/equities_tw/valuation_daily?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema equities_tw_valuation_daily.

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

Institutional trades of TPEx securities#

GET /v1/finance/equities_tw/institutional_daily

Foreign, investment-trust and dealer net trades of a trading day. TPEx securities only: the TWSE file is not read. Either security_id (one security's history) or date (every security of the day), not both. Every response carries meta.attribution ([{source_id, credit}]): whoever shows a row shows its credit. the Taiwan equities guide.

Parameters

NameInRequiredTypeDescription
security_idquerynostring, pattern ^(TWSE|TPEX):[0-9A-Z]+$One security's history, e.g. TWSE:2330. Give this or date.
datequerynostring, dateEvery security of this trading day, YYYY-MM-DD. Give this or security_id.
marketquerynoTWSE | TPEXNarrows a date query to one exchange.
fromquerynostring, dateFirst trading day (inclusive) of a history.
toquerynostring, dateLast trading day (exclusive) of a history; must be after from.
orderquerynoasc | descSort direction (default: newest first for a history, security_id order for a day).
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–1000, default 100Rows per page.

Example

bash
curl -s "https://api.aggre.org/v1/finance/equities_tw/institutional_daily?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema equities_tw_institutional_daily.

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

Margin balances of TPEx securities#

GET /v1/finance/equities_tw/margin_daily

Margin and short balances of a trading day, in lots as published. TPEx securities only: the TWSE file (11680) is not read. Either security_id (one security's history) or date (every security of the day), not both. Every response carries meta.attribution ([{source_id, credit}]): whoever shows a row shows its credit. the Taiwan equities guide.

Parameters

NameInRequiredTypeDescription
security_idquerynostring, pattern ^(TWSE|TPEX):[0-9A-Z]+$One security's history, e.g. TWSE:2330. Give this or date.
datequerynostring, dateEvery security of this trading day, YYYY-MM-DD. Give this or security_id.
marketquerynoTWSE | TPEXNarrows a date query to one exchange.
fromquerynostring, dateFirst trading day (inclusive) of a history.
toquerynostring, dateLast trading day (exclusive) of a history; must be after from.
orderquerynoasc | descSort direction (default: newest first for a history, security_id order for a day).
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–1000, default 100Rows per page.

Example

bash
curl -s "https://api.aggre.org/v1/finance/equities_tw/margin_daily?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema equities_tw_margin_daily.

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

Monthly revenue of Taiwan companies#

GET /v1/finance/equities_tw/monthly_revenue

A company's revenue for one month, in thousand NT$ as published. A revised figure is a new version; versions=all and as_of serve the history. Every response carries meta.attribution ([{source_id, credit}]): whoever shows a row shows its credit. the Taiwan equities guide.

Parameters

NameInRequiredTypeDescription
security_idquerynostring, pattern ^(TWSE|TPEX):[0-9A-Z]+$One security's history. Give this or month.
monthquerynostring, dateEvery security of this month, the first day, YYYY-MM-01. Give this or security_id.
fromquerynostring, dateFirst month (inclusive) of a history.
toquerynostring, dateLast month (exclusive) of a history.
versionsquerynolatest | alllatest (default) or every stored version.
as_ofquerynointeger, int64What Aggre knew at this Unix time in milliseconds.
orderquerynoasc | descSort direction (default: newest first for a history, security_id order for a day).
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–1000, default 100Rows per page.

Example

bash
curl -s "https://api.aggre.org/v1/finance/equities_tw/monthly_revenue?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema equities_tw_monthly_revenue.

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

Quarterly statements of Taiwan companies#

GET /v1/finance/equities_tw/statements

Income statements and balance sheets in the six industry formats, amounts in thousand NT$ as published. A revised figure is a new version. Every response carries meta.attribution ([{source_id, credit}]): whoever shows a row shows its credit. the Taiwan equities guide.

Parameters

NameInRequiredTypeDescription
security_idquerynostring, pattern ^(TWSE|TPEX):[0-9A-Z]+$One security's history. Give this or fiscal_year with quarter.
fiscal_yearquerynointeger, 1990–With quarter: every security of that quarter.
quarterquerynointeger, 1–4With fiscal_year.
statementquerynoincome | balanceOnly this statement.
formatquerynoci | basi | bd | fh | ins | mimOnly this industry format.
fromquerynostring, dateFirst period (inclusive) of a history.
toquerynostring, dateLast period (exclusive) of a history.
versionsquerynolatest | alllatest (default) or every stored version.
as_ofquerynointeger, int64What Aggre knew at this Unix time in milliseconds.
orderquerynoasc | descSort direction (default: newest first for a history, security_id order for a day).
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–1000, default 100Rows per page.

Example

bash
curl -s "https://api.aggre.org/v1/finance/equities_tw/statements?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema equities_tw_statements.

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

Index closes of Taiwan exchanges#

GET /v1/finance/equities_tw/indices

Close of each exchange index of a trading day. Give market or index_name (or both). Every response carries meta.attribution ([{source_id, credit}]): whoever shows a row shows its credit. the Taiwan equities guide.

Parameters

NameInRequiredTypeDescription
marketquerynoTWSE | TPEXOnly this exchange. Give this or index_name.
index_namequerynostringExact index name. Give this or market.
fromquerynostring, dateFirst trading day (inclusive).
toquerynostring, dateLast trading day (exclusive).
orderquerynoasc | descSort direction (default: newest first for a history, security_id order for a day).
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–1000, default 100Rows per page.

Example

bash
curl -s "https://api.aggre.org/v1/finance/equities_tw/indices?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema equities_tw_indices.

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

Registered upstream files of the Taiwan datasets#

GET /v1/finance/equities_tw/sources

The registered files with their licence, the terms state (terms_read_on) and when each was last read. Every response carries meta.attribution ([{source_id, credit}]): whoever shows a row shows its credit. the Taiwan equities guide.

Parameters

NameInRequiredTypeDescription
marketquerynoTWSE | TPEXOnly this exchange.
kindquerynovaluation | institutional | margin | close | index | revenue | income | balance | profileOnly this kind of file.
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–1000, default 100Rows per page.

Example

bash
curl -s "https://api.aggre.org/v1/finance/equities_tw/sources?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema equities_tw_sources.

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

Generated from contracts/data.openapi.yaml when the site is built, so it matches the API contract.