Skip to content

Taiwan Stock Exchange API

11 endpointsFinance & CryptoTWsocial:read4 real examples

Returns TWSE stock quotes, valuation ratios, company registry entries, index values, margin balances and monthly average prices.

View as Markdown
GET/twse/quotesThe trading of the latest day of listed stocks, one code or all of them.
GET/twse/valuationThe price-to-earnings ratio, price-to-book ratio and dividend yield of listed stocks.
GET/twse/companyThe register entry of one listed company: names, industry, chairman, address and listing date.
GET/twse/indexesThe closing value and change of every Taiwan Stock Exchange index on the latest trading day.
GET/twse/marginMargin purchase and short sale balances of listed stocks on the latest trading day.
GET/twse/monthlyAverageThe closing price of one listed stock on the latest day and its monthly average closing price.
GET/twse/dividendsDividend announcements of listed companies: cash and stock dividend per share, the board and shareholder meeting dates, for one company or every company.
GET/twse/materialNewsMaterial information announcements (重大訊息) of listed companies: subject, the TWSE rule clause and details, for one company or every company.
GET/twse/topVolumeThe twenty listed securities with the largest trading volume on the latest day, with their prices and change.
GET/twse/marketVolumeDaily trading totals of the whole Taiwan Stock Exchange market in the current month: shares, value, transactions and the TAIEX.
GET/twse/foreignOwnershipThe twenty listed stocks with the highest share held by foreign and mainland Chinese investors, with the room left for them to buy.

quotes

GET/v1/twse/quotes

The trading of the latest day of listed stocks, one code or all of them.

scope social:read1 unitcached 10 min

Parameters

code
string
Security code, such as 2330. Omit it for every listed security.
e.g. 2330
tunnel
string
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.
proxy
string
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.
profileId
string
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
datestring
itemsQuote[]
changenumber (double)
closenumber (double)
codestring
highnumber (double)
lownumber (double)
namestring
opennumber (double)
transactionsinteger (int64)
valueinteger (int64)
volumeinteger (int64)
curl "https://api.hoshime.com/v1/twse/quotes?code=2330" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "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

GET/v1/twse/valuation

The price-to-earnings ratio, price-to-book ratio and dividend yield of listed stocks.

scope social:read1 unitcached 1 h

Parameters

code
string
Security code, such as 2330. Omit it for every listed stock.
e.g. 2330
tunnel
string
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.
proxy
string
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.
profileId
string
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
datestring
itemsValuation[]
codestring
dividendYieldnumber (double) | null
namestring
peRationumber (double) | null
priceToBooknumber (double) | null
curl "https://api.hoshime.com/v1/twse/valuation?code=2330" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/twse/company

The register entry of one listed company: names, industry, chairman, address and listing date.

scope social:read1 unitcached 24 h

Parameters

code
string
required
Company code, such as 2330.
e.g. 2330
tunnel
string
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.
proxy
string
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.
profileId
string
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
addressstring
capitalstring
chairmanstring
codestring
englishNamestring
foundedstring
industrystring
listedOnstring
namestring
phonestring
shortNamestring
websitestring
curl "https://api.hoshime.com/v1/twse/company?code=2330" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/twse/indexes

The closing value and change of every Taiwan Stock Exchange index on the latest trading day.

scope social:read1 unitcached 10 minpaginated

Parameters

tunnel
string
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.
proxy
string
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.
profileId
string
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
changenumber (double)
changePercentnumber (double)
closenumber (double)
datestring
namestring
curl "https://api.hoshime.com/v1/twse/indexes" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "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

GET/v1/twse/margin

Margin purchase and short sale balances of listed stocks on the latest trading day.

scope social:read1 unitcached 30 minpaginated

Parameters

code
string
Security code, such as 2330. Omit it for every listed security.
e.g. 2330
tunnel
string
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.
proxy
string
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.
profileId
string
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
codestring
marginBalanceinteger (int64)
marginBuyinteger (int64)
marginSellinteger (int64)
namestring
shortBalanceinteger (int64)
shortSellinteger (int64)
curl "https://api.hoshime.com/v1/twse/margin?code=2330" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/twse/monthlyAverage

The closing price of one listed stock on the latest day and its monthly average closing price.

scope social:read1 unitcached 30 min

Parameters

code
string
required
Security code, such as 2330.
e.g. 2330
tunnel
string
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.
proxy
string
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.
profileId
string
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
closenumber (double)
codestring
datestring
monthAveragenumber (double)
namestring
curl "https://api.hoshime.com/v1/twse/monthlyAverage?code=2330" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "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

GET/v1/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.

scope social:read1 unitcached 1 hpaginated

Parameters

code
string
Company code, such as 2330. Omit it for every company.
e.g. 2330
tunnel
string
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.
proxy
string
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.
profileId
string
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
boardDatestring
cashPerSharenumber (double)
codestring
fiscalYearinteger (int64)
meetingDatestring
namestring
periodstring
statusstring
stockPerSharenumber (double)
curl "https://api.hoshime.com/v1/twse/dividends?code=2330" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "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

GET/v1/twse/materialNews

Material information announcements (重大訊息) of listed companies: subject, the TWSE rule clause and details, for one company or every company.

scope social:read1 unitcached 10 minpaginated

Parameters

code
string
Company code, such as 2330. Omit it for every company.
e.g. 2330
tunnel
string
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.
proxy
string
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.
profileId
string
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
clausestring
codestring
datestring
detailsstring
namestring
subjectstring
timestring
curl "https://api.hoshime.com/v1/twse/materialNews?code=2330" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "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

GET/v1/twse/topVolume

The twenty listed securities with the largest trading volume on the latest day, with their prices and change.

scope social:read1 unitcached 10 min

Parameters

tunnel
string
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.
proxy
string
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.
profileId
string
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
datestring
itemsTopVolume[]
changenumber (double)
closenumber (double)
codestring
highnumber (double)
lownumber (double)
namestring
opennumber (double)
rankinteger (int64)
transactionsinteger (int64)
volumeinteger (int64)
curl "https://api.hoshime.com/v1/twse/topVolume" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "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

GET/v1/twse/marketVolume

Daily trading totals of the whole Taiwan Stock Exchange market in the current month: shares, value, transactions and the TAIEX.

scope social:read1 unitcached 30 minpaginated

Parameters

tunnel
string
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.
proxy
string
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.
profileId
string
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
changenumber (double)
datestring
taiexnumber (double)
transactionsinteger (int64)
valueinteger (int64)
volumeinteger (int64)
curl "https://api.hoshime.com/v1/twse/marketVolume" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "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

GET/v1/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.

scope social:read1 unitcached 1 hpaginated

Parameters

tunnel
string
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.
proxy
string
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.
profileId
string
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
availablePercentnumber (double)
codestring
heldPercentnumber (double)
heldSharesinteger (int64)
issuedSharesinteger (int64)
limitPercentnumber (double)
namestring
rankinteger (int64)
curl "https://api.hoshime.com/v1/twse/foreignOwnership" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Response shape
{
  "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
  }
}
esc
↑↓ move↵ open