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 - Daily close of Taiwan securities:
GET /v1/finance/equities_tw/daily_close - Daily valuation ratios of Taiwan securities:
GET /v1/finance/equities_tw/valuation_daily - Institutional trades of TPEx securities:
GET /v1/finance/equities_tw/institutional_daily - Margin balances of TPEx securities:
GET /v1/finance/equities_tw/margin_daily - Monthly revenue of Taiwan companies:
GET /v1/finance/equities_tw/monthly_revenue - Quarterly statements of Taiwan companies:
GET /v1/finance/equities_tw/statements - Index closes of Taiwan exchanges:
GET /v1/finance/equities_tw/indices - Registered upstream files of the Taiwan datasets:
GET /v1/finance/equities_tw/sources
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
market | query | no | TWSE | TPEX | Only this exchange. |
q | query | no | string | Code prefix or name substring. |
industry_code | query | no | string, pattern ^[0-9]{2}$ | Two-digit industry code, e.g. 24. |
cursor | query | no | string | The previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400. |
limit | query | no | integer, 1–1000, default 100 | Rows per page. |
Example
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
security_id | query | no | string, pattern ^(TWSE|TPEX):[0-9A-Z]+$ | One security's history, e.g. TWSE:2330. Give this or date. |
date | query | no | string, date | Every security of this trading day, YYYY-MM-DD. Give this or security_id. |
market | query | no | TWSE | TPEX | Narrows a date query to one exchange. |
from | query | no | string, date | First trading day (inclusive) of a history. |
to | query | no | string, date | Last trading day (exclusive) of a history; must be after from. |
order | query | no | asc | desc | Sort direction (default: newest first for a history, security_id order for a day). |
cursor | query | no | string | The previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400. |
limit | query | no | integer, 1–1000, default 100 | Rows per page. |
Example
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
security_id | query | no | string, pattern ^(TWSE|TPEX):[0-9A-Z]+$ | One security's history, e.g. TWSE:2330. Give this or date. |
date | query | no | string, date | Every security of this trading day, YYYY-MM-DD. Give this or security_id. |
market | query | no | TWSE | TPEX | Narrows a date query to one exchange. |
from | query | no | string, date | First trading day (inclusive) of a history. |
to | query | no | string, date | Last trading day (exclusive) of a history; must be after from. |
order | query | no | asc | desc | Sort direction (default: newest first for a history, security_id order for a day). |
cursor | query | no | string | The previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400. |
limit | query | no | integer, 1–1000, default 100 | Rows per page. |
Example
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
security_id | query | no | string, pattern ^(TWSE|TPEX):[0-9A-Z]+$ | One security's history, e.g. TWSE:2330. Give this or date. |
date | query | no | string, date | Every security of this trading day, YYYY-MM-DD. Give this or security_id. |
market | query | no | TWSE | TPEX | Narrows a date query to one exchange. |
from | query | no | string, date | First trading day (inclusive) of a history. |
to | query | no | string, date | Last trading day (exclusive) of a history; must be after from. |
order | query | no | asc | desc | Sort direction (default: newest first for a history, security_id order for a day). |
cursor | query | no | string | The previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400. |
limit | query | no | integer, 1–1000, default 100 | Rows per page. |
Example
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
security_id | query | no | string, pattern ^(TWSE|TPEX):[0-9A-Z]+$ | One security's history, e.g. TWSE:2330. Give this or date. |
date | query | no | string, date | Every security of this trading day, YYYY-MM-DD. Give this or security_id. |
market | query | no | TWSE | TPEX | Narrows a date query to one exchange. |
from | query | no | string, date | First trading day (inclusive) of a history. |
to | query | no | string, date | Last trading day (exclusive) of a history; must be after from. |
order | query | no | asc | desc | Sort direction (default: newest first for a history, security_id order for a day). |
cursor | query | no | string | The previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400. |
limit | query | no | integer, 1–1000, default 100 | Rows per page. |
Example
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
security_id | query | no | string, pattern ^(TWSE|TPEX):[0-9A-Z]+$ | One security's history. Give this or month. |
month | query | no | string, date | Every security of this month, the first day, YYYY-MM-01. Give this or security_id. |
from | query | no | string, date | First month (inclusive) of a history. |
to | query | no | string, date | Last month (exclusive) of a history. |
versions | query | no | latest | all | latest (default) or every stored version. |
as_of | query | no | integer, int64 | What Aggre knew at this Unix time in milliseconds. |
order | query | no | asc | desc | Sort direction (default: newest first for a history, security_id order for a day). |
cursor | query | no | string | The previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400. |
limit | query | no | integer, 1–1000, default 100 | Rows per page. |
Example
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
security_id | query | no | string, pattern ^(TWSE|TPEX):[0-9A-Z]+$ | One security's history. Give this or fiscal_year with quarter. |
fiscal_year | query | no | integer, 1990– | With quarter: every security of that quarter. |
quarter | query | no | integer, 1–4 | With fiscal_year. |
statement | query | no | income | balance | Only this statement. |
format | query | no | ci | basi | bd | fh | ins | mim | Only this industry format. |
from | query | no | string, date | First period (inclusive) of a history. |
to | query | no | string, date | Last period (exclusive) of a history. |
versions | query | no | latest | all | latest (default) or every stored version. |
as_of | query | no | integer, int64 | What Aggre knew at this Unix time in milliseconds. |
order | query | no | asc | desc | Sort direction (default: newest first for a history, security_id order for a day). |
cursor | query | no | string | The previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400. |
limit | query | no | integer, 1–1000, default 100 | Rows per page. |
Example
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
market | query | no | TWSE | TPEX | Only this exchange. Give this or index_name. |
index_name | query | no | string | Exact index name. Give this or market. |
from | query | no | string, date | First trading day (inclusive). |
to | query | no | string, date | Last trading day (exclusive). |
order | query | no | asc | desc | Sort direction (default: newest first for a history, security_id order for a day). |
cursor | query | no | string | The previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400. |
limit | query | no | integer, 1–1000, default 100 | Rows per page. |
Example
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
market | query | no | TWSE | TPEX | Only this exchange. |
kind | query | no | valuation | institutional | margin | close | index | revenue | income | balance | profile | Only this kind of file. |
cursor | query | no | string | The previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400. |
limit | query | no | integer, 1–1000, default 100 | Rows per page. |
Example
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.