Taiwan Stock Exchange API
Returns TWSE stock quotes, valuation ratios, company registry entries, index values, margin balances and monthly average prices.
View as Markdown| GET | /twse/quotes | The trading of the latest day of listed stocks, one code or all of them. |
| GET | /twse/valuation | The price-to-earnings ratio, price-to-book ratio and dividend yield of listed stocks. |
| GET | /twse/company | The register entry of one listed company: names, industry, chairman, address and listing date. |
| GET | /twse/indexes | The closing value and change of every Taiwan Stock Exchange index on the latest trading day. |
| GET | /twse/margin | Margin purchase and short sale balances of listed stocks on the latest trading day. |
| GET | /twse/monthlyAverage | The closing price of one listed stock on the latest day and its monthly average closing price. |
| GET | /twse/dividends | Dividend announcements of listed companies: cash and stock dividend per share, the board and shareholder meeting dates, for one company or every company. |
| GET | /twse/materialNews | Material information announcements (重大訊息) of listed companies: subject, the TWSE rule clause and details, for one company or every company. |
| GET | /twse/topVolume | The twenty listed securities with the largest trading volume on the latest day, with their prices and change. |
| GET | /twse/marketVolume | Daily trading totals of the whole Taiwan Stock Exchange market in the current month: shares, value, transactions and the TAIEX. |
| GET | /twse/foreignOwnership | The twenty listed stocks with the highest share held by foreign and mainland Chinese investors, with the room left for them to buy. |
quotes
/v1/twse/quotesThe trading of the latest day of listed stocks, one code or all of them.
Parameters
codestring | Security code, such as 2330. Omit it for every listed security. e.g. 2330 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
12 fields
date | string |
items | Quote[] |
change | number (double) |
close | number (double) |
code | string |
high | number (double) |
low | number (double) |
name | string |
open | number (double) |
transactions | integer (int64) |
value | integer (int64) |
volume | integer (int64) |
curl "https://api.hoshime.com/v1/twse/quotes?code=2330" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twse/quotes?code=2330", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twse/quotes?code=2330", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "date": "…", "items": [ { "change": 0, "close": 0, "code": "…", "high": 0, "low": 0, "name": "…", "open": 0, "transactions": 0, "value": 0, "volume": 0 } ] }, "meta": { "cached": false, "endpoint": "quotes", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "twse", "requestId": "req_2Xb9kQ…", "units": 1 } }
valuation
/v1/twse/valuationThe price-to-earnings ratio, price-to-book ratio and dividend yield of listed stocks.
Parameters
codestring | Security code, such as 2330. Omit it for every listed stock. e.g. 2330 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
7 fields
date | string |
items | Valuation[] |
code | string |
dividendYield | number (double) | null |
name | string |
peRatio | number (double) | null |
priceToBook | number (double) | null |
curl "https://api.hoshime.com/v1/twse/valuation?code=2330" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twse/valuation?code=2330", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twse/valuation?code=2330", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "date": "2026-11-05", "items": [ { "code": "2330", "dividendYield": 0.98, "name": "台積電", "peRatio": 25.96, "priceToBook": 9.03 } ] }, "meta": { "cached": false, "endpoint": "valuation", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "twse", "requestId": "req_2Xb9kQ…", "units": 1 } }
company
/v1/twse/companyThe register entry of one listed company: names, industry, chairman, address and listing date.
Parameters
codestring required | Company code, such as 2330. e.g. 2330 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
12 fields
address | string |
capital | string |
chairman | string |
code | string |
englishName | string |
founded | string |
industry | string |
listedOn | string |
name | string |
phone | string |
shortName | string |
website | string |
curl "https://api.hoshime.com/v1/twse/company?code=2330" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twse/company?code=2330", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twse/company?code=2330", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "address": "新竹科學園區力行六路8號", "capital": "259323700670", "chairman": "魏哲家", "code": "2330", "englishName": "TSMC", "founded": "1987-02-21", "industry": "24", "listedOn": "1994-09-05", "name": "台灣積體電路製造股份有限公司", "phone": "03-5636688", "shortName": "台積電", "website": "https://www.tsmc.com" }, "meta": { "cached": false, "endpoint": "company", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "twse", "requestId": "req_2Xb9kQ…", "units": 1 } }
indexes
/v1/twse/indexesThe closing value and change of every Taiwan Stock Exchange index on the latest trading day.
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
5 fields
change | number (double) |
changePercent | number (double) |
close | number (double) |
date | string |
name | string |
curl "https://api.hoshime.com/v1/twse/indexes" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twse/indexes", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twse/indexes", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "change": 0, "changePercent": 0, "close": 0, "date": "…", "name": "…" } ], "meta": { "cached": false, "endpoint": "indexes", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "twse", "requestId": "req_2Xb9kQ…", "units": 1 } }
margin
/v1/twse/marginMargin purchase and short sale balances of listed stocks on the latest trading day.
Parameters
codestring | Security code, such as 2330. Omit it for every listed security. e.g. 2330 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
7 fields
code | string |
marginBalance | integer (int64) |
marginBuy | integer (int64) |
marginSell | integer (int64) |
name | string |
shortBalance | integer (int64) |
shortSell | integer (int64) |
curl "https://api.hoshime.com/v1/twse/margin?code=2330" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twse/margin?code=2330", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twse/margin?code=2330", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "code": "2330", "marginBalance": 34596, "marginBuy": 640, "marginSell": 1157, "name": "台積電", "shortBalance": 47, "shortSell": 35 } ], "meta": { "cached": false, "endpoint": "margin", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "twse", "requestId": "req_2Xb9kQ…", "units": 1 } }
monthlyAverage
/v1/twse/monthlyAverageThe closing price of one listed stock on the latest day and its monthly average closing price.
Parameters
codestring required | Security code, such as 2330. e.g. 2330 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
5 fields
close | number (double) |
code | string |
date | string |
monthAverage | number (double) |
name | string |
curl "https://api.hoshime.com/v1/twse/monthlyAverage?code=2330" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twse/monthlyAverage?code=2330", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twse/monthlyAverage?code=2330", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "close": 2240, "code": "2330", "date": "2026-11-05", "monthAverage": 2281.25, "name": "台積電" }, "meta": { "cached": false, "endpoint": "monthlyAverage", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "twse", "requestId": "req_2Xb9kQ…", "units": 1 } }
dividends
/v1/twse/dividendsDividend announcements of listed companies: cash and stock dividend per share, the board and shareholder meeting dates, for one company or every company.
Parameters
codestring | Company code, such as 2330. Omit it for every company. e.g. 2330 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
9 fields
boardDate | string |
cashPerShare | number (double) |
code | string |
fiscalYear | integer (int64) |
meetingDate | string |
name | string |
period | string |
status | string |
stockPerShare | number (double) |
curl "https://api.hoshime.com/v1/twse/dividends?code=2330" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twse/dividends?code=2330", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twse/dividends?code=2330", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "boardDate": "…", "cashPerShare": 0, "code": "…", "fiscalYear": 0, "meetingDate": "…", "name": "…", "period": "…", "status": "…", "stockPerShare": 0 } ], "meta": { "cached": false, "endpoint": "dividends", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "twse", "requestId": "req_2Xb9kQ…", "units": 1 } }
materialNews
/v1/twse/materialNewsMaterial information announcements (重大訊息) of listed companies: subject, the TWSE rule clause and details, for one company or every company.
Parameters
codestring | Company code, such as 2330. Omit it for every company. e.g. 2330 |
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
7 fields
clause | string |
code | string |
date | string |
details | string |
name | string |
subject | string |
time | string |
curl "https://api.hoshime.com/v1/twse/materialNews?code=2330" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twse/materialNews?code=2330", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twse/materialNews?code=2330", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "clause": "…", "code": "…", "date": "…", "details": "…", "name": "…", "subject": "…", "time": "…" } ], "meta": { "cached": false, "endpoint": "materialNews", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "twse", "requestId": "req_2Xb9kQ…", "units": 1 } }
topVolume
/v1/twse/topVolumeThe twenty listed securities with the largest trading volume on the latest day, with their prices and change.
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
12 fields
date | string |
items | TopVolume[] |
change | number (double) |
close | number (double) |
code | string |
high | number (double) |
low | number (double) |
name | string |
open | number (double) |
rank | integer (int64) |
transactions | integer (int64) |
volume | integer (int64) |
curl "https://api.hoshime.com/v1/twse/topVolume" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twse/topVolume", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twse/topVolume", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": { "date": "…", "items": [ { "change": 0, "close": 0, "code": "…", "high": 0, "low": 0, "name": "…", "open": 0, "rank": 0, "transactions": 0, "volume": 0 } ] }, "meta": { "cached": false, "endpoint": "topVolume", "fetchedAt": "2026-11-06T09:41:00Z", "platform": "twse", "requestId": "req_2Xb9kQ…", "units": 1 } }
marketVolume
/v1/twse/marketVolumeDaily trading totals of the whole Taiwan Stock Exchange market in the current month: shares, value, transactions and the TAIEX.
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
6 fields
change | number (double) |
date | string |
taiex | number (double) |
transactions | integer (int64) |
value | integer (int64) |
volume | integer (int64) |
curl "https://api.hoshime.com/v1/twse/marketVolume" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twse/marketVolume", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twse/marketVolume", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "change": 0, "date": "…", "taiex": 0, "transactions": 0, "value": 0, "volume": 0 } ], "meta": { "cached": false, "endpoint": "marketVolume", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "twse", "requestId": "req_2Xb9kQ…", "units": 1 } }
foreignOwnership
/v1/twse/foreignOwnershipThe twenty listed stocks with the highest share held by foreign and mainland Chinese investors, with the room left for them to buy.
Parameters
tunnelstring | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
proxystring | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
profileIdstring | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |
Response data
8 fields
availablePercent | number (double) |
code | string |
heldPercent | number (double) |
heldShares | integer (int64) |
issuedShares | integer (int64) |
limitPercent | number (double) |
name | string |
rank | integer (int64) |
curl "https://api.hoshime.com/v1/twse/foreignOwnership" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/twse/foreignOwnership", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/twse/foreignOwnership", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "data": [ { "availablePercent": 0, "code": "…", "heldPercent": 0, "heldShares": 0, "issuedShares": 0, "limitPercent": 0, "name": "…", "rank": 0 } ], "meta": { "cached": false, "endpoint": "foreignOwnership", "fetchedAt": "2026-11-06T09:41:00Z", "pagination": { "nextCursor": "EpcDEgV…", "hasMore": true, "total": null }, "platform": "twse", "requestId": "req_2Xb9kQ…", "units": 1 } }