# Taiwan Treasury Stock Buybacks — 庫藏股 Filings API (`chamarix/taiwan-treasury-stock-buybacks`) Actor

Every treasury-stock buyback ever filed in Taiwan: all 5,800+ board resolutions on the TWSE, TPEX and public-issue boards since 2000, with the planned size, price band and window, and — once the window closes — how much of it the company actually executed and at what average price.

- **URL**: https://apify.com/chamarix/taiwan-treasury-stock-buybacks.md
- **Developed by:** [chris](https://apify.com/chamarix) (community)
- **Categories:** AI, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Taiwan Treasury Stock Buybacks (庫藏股) API

Get structured JSON access to **every treasury-stock buyback ever filed in Taiwan** — all **5,857 board resolutions** on the TWSE, TPEX and public-issue boards since **2000-08-09**, with the size, price band and window each company declared, and — once the window closes — how many shares it actually bought and at what average price.

Taiwanese companies buy their own shares back under §28-2 of the Securities and Exchange Act, and every one of them has to tell the regulator first: how many shares, between which two prices, over which two months, and why. When the window closes they have to file what they actually did. That before-and-after pair is what makes this dataset unusual — **a public, 26-year record of what companies said they would do with their own cash and what they then did.** Across all 5,812 finished buybacks the answer is **64.57%** — 43.5 billion shares actually bought against 67.3 billion announced, for a total outlay of **NT$1.03 trillion**.

The report has no date parameter and no per-company view — it is one HTML page per board carrying the entire archive. This Actor takes that page apart, verifies it against **five identities the page has to satisfy** before emitting a single record, and gives you the filtering the exchange never built.

### Why this data matters

- **A buyback is the clearest signal a company can send about its own valuation.** Nobody buys their own stock at a price they think is too high. `purpose` splits that signal in two: `CREDIT_AND_SHAREHOLDER_INTEREST` (2,292 filings) is a response to the share price, while `EMPLOYEE_TRANSFER` (3,533) is a compensation decision that happens to be executed in the market.
- **Announcing is not doing, and this dataset proves it.** 179 buybacks bought **zero shares** after announcing. Only 37.5% finished the plan in full. `execution_rate_pct` and `incomplete_reason` — the company's own written explanation for falling short — turn a press release into a track record.
- **Where in the band they bought tells you what they thought.** `price_floor`, `price_ceiling` and `average_buyback_price` sit side by side, so you can see who bought at the bottom of their own range and who chased. 240 finished buybacks paid an average **below their declared floor**, which Taiwanese rules explicitly allow.
- **Open programmes are a live buying-pressure signal.** `onlyInProgress` gives you the buybacks whose windows have not closed — companies with a standing, disclosed mandate to buy their own stock right now.
- **The largest single buyback on record is TSMC's.** Its 2007-11-13 resolution bought all 800,000,000 shares it announced, at NT$60.58, for **NT$48.5bn**. TSMC has filed six buybacks in 26 years and this Actor has all of them, down to the 2024-06-05 programme that bought 3,249,000 shares at NT$950.81.
- **Nobody serves this in English.** The source is one Chinese-language HTML table per board, behind a host that answers "FOR SECURITY REASONS, THIS PAGE CAN NOT BE ACCESSED" if you ask it the obvious way.

### Output

Two record types, selected with `recordTypes`.

**`BUYBACK`** — one record per filed buyback. Execution fields are `null` while the window is still open:

```json
{
  "record_type": "BUYBACK",
  "market": "TWSE",
  "company_code": "8028",
  "company_name": "昇陽半導體",
  "board_resolution_date": "2026-08-13",
  "purpose_code": 1,
  "purpose": "EMPLOYEE_TRANSFER",
  "purpose_zh": "轉讓股份予員工",
  "max_buyback_amount": 3483787097,
  "planned_shares": 300000,
  "price_floor": 210.0,
  "price_ceiling": 430.0,
  "planned_start_date": "2026-08-13",
  "planned_end_date": "2026-10-12",
  "completed": false,
  "executed_shares": null,
  "cancelled_or_transferred_shares": null,
  "execution_rate_pct": null,
  "executed_amount": null,
  "average_buyback_price": null,
  "share_of_outstanding_pct": null,
  "incomplete_reason": null,
  "figures_self_consistent": null
}
```

A finished one carries the whole story:

```json
{
  "record_type": "BUYBACK",
  "market": "TWSE",
  "company_code": "1101",
  "company_name": "台泥",
  "board_resolution_date": "2018-02-02",
  "purpose": "EMPLOYEE_TRANSFER",
  "planned_shares": 6000000,
  "price_floor": 26.53,
  "price_ceiling": 56.63,
  "completed": true,
  "executed_shares": 6000000,
  "cancelled_or_transferred_shares": 6000000,
  "execution_rate_pct": 100.0,
  "executed_amount": 218165694,
  "average_buyback_price": 36.36,
  "share_of_outstanding_pct": 0.14,
  "incomplete_reason": null,
  "figures_self_consistent": true
}
```

**`COMPANY_TOTAL`** — the exchange's own all-time totals per company, one record each:

```json
{
  "record_type": "COMPANY_TOTAL",
  "market": "TWSE",
  "company_code": "2330",
  "company_name": "台積電",
  "buyback_count_all_time": 6,
  "total_planned_shares": 1887636000,
  "total_executed_shares": 1424905000,
  "total_cancelled_or_transferred_shares": 1424905000,
  "overall_execution_rate_pct": 75.49,
  "total_executed_amount": 89914910189
}
```

`COMPANY_TOTAL` figures are always all-time as the exchange publishes them — they are not recomputed over a `startDate` window, so they stay the number the exchange stands behind.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `recordTypes` | array | `["BUYBACK"]` | `BUYBACK`, `COMPANY_TOTAL`, or both — they come from the same request |
| `markets` | array | `["TWSE", "TPEX"]` | Also `PUBLIC` (public-issue, unlisted). One request per market |
| `startDate` | string | *(all)* | Keep buybacks resolved on or after this date, `YYYY-MM-DD` |
| `endDate` | string | *(all)* | Keep buybacks resolved on or before this date, inclusive |
| `stockCodes` | array | *(all)* | e.g. `["2330", "2317"]` — matched as text, since codes are not always numeric |
| `purposes` | array | *(all)* | `EMPLOYEE_TRANSFER`, `SHARE_CONVERSION`, `CREDIT_AND_SHAREHOLDER_INTEREST` |
| `onlyInProgress` | boolean | `false` | Only buybacks the company has not yet filed as finished |

The whole archive is three requests, so every filter above is applied locally and costs nothing.

### How the numbers are checked

The report is an HTML table read by column position, which is only safe if the columns are what you think they are. Before any record is emitted, this Actor verifies the page against itself — five checks, no extra requests:

1. **The report's own purpose tally.** The page prints how many buybacks it lists for each of the three purposes. The parser's counts must equal it exactly. This check earned its keep during development: 永豐金證 files under company code `0009A0`, a digits-only code match silently dropped five buybacks, and the tally came up five short.
2. **Every company's 累計 row.** The page publishes each company's all-time totals alongside its individual buybacks. Planned shares, executed shares, cancelled-or-transferred shares and amount spent must each sum to the published total, for all 1,226 companies.
3. **The execution rate.** `executed_shares ÷ planned_shares` must equal the printed `execution_rate_pct` to the last published decimal.
4. **"Not finished" means "no figures yet".** A buyback flagged as incomplete must have every execution column blank, and vice versa — 5,857 out of 5,857.
5. **Average price against amount ÷ shares.** True on all but four filings from 2000-2001, where the company's own numbers do not reconcile (統一證's 2001-06-04 buyback prints NT$9.27 against an amount that works out to NT$119.85). Those are published exactly as filed and flagged `figures_self_consistent: false` rather than silently corrected — there is no way to know which of the two figures the filer got wrong.

The first four raise and fail the run. A layout change is caught loudly instead of producing plausible, wrong numbers.

### Notes on the source

- **Units.** `max_buyback_amount` and `executed_amount` are in **NT dollars, not thousands** — unlike most MOPS reports. Share counts are in shares, prices are NT$ per share.
- **Dates** are converted from the ROC calendar (民國 115 → 2026) to ISO `YYYY-MM-DD`.
- **The emerging board is not offered.** §28-2 only lets listed and OTC companies buy their own shares back, and the report answers 查無所需資料 for it.
- **`completed: false` is not always "running now".** A handful of legacy filings — the oldest from 2010 — were never closed out by the filer and still sit open in the official report. Check `planned_end_date` before treating one as live.
- **Legal window.** Taiwanese rules cap the buying window at two months from the board resolution, which is why `planned_end_date` is never far from `planned_start_date`.

### Taiwan Market Data Suite

This Actor is part of a suite of 23 Taiwan market data APIs by [chamarix](https://apify.com/chamarix) — official sources only, cross-validated against independent official endpoints, clean JSON out. Code samples for the whole suite: [GitHub](https://github.com/cc77556/taiwan-market-data-actors).

**Market data:**

- [twse-institutional-trades](https://apify.com/chamarix/twse-institutional-trades) — Daily institutional buy/sell (foreign, investment trust, dealer) per stock — TWSE listed
- [tpex-institutional-trades](https://apify.com/chamarix/tpex-institutional-trades) — Daily institutional buy/sell per stock — TPEx OTC market
- [taiwan-monthly-revenue](https://apify.com/chamarix/taiwan-monthly-revenue) — Monthly revenue of 1,900+ listed & OTC companies, MoM/YoY
- [taiwan-financial-statements](https://apify.com/chamarix/taiwan-financial-statements) — Quarterly income statement, balance sheet & cash flow back to 2013
- [taiwan-dividend-calendar](https://apify.com/chamarix/taiwan-dividend-calendar) — Ex-dividend / ex-rights dates, reference prices & payouts back to 2003
- [taiwan-margin-trading](https://apify.com/chamarix/taiwan-margin-trading) — Daily margin trading & short sale balances per stock
- [taiwan-sbl-short-sale-balance](https://apify.com/chamarix/taiwan-sbl-short-sale-balance) — Securities-lending short sale balances per stock
- [taiwan-day-trading-stats](https://apify.com/chamarix/taiwan-day-trading-stats) — Day-trading volume, value & ratio per stock since 2014
- [tdcc-shareholding-dispersion](https://apify.com/chamarix/tdcc-shareholding-dispersion) — Weekly TDCC shareholding dispersion (retail vs whale structure)
- [taiwan-foreign-shareholding](https://apify.com/chamarix/taiwan-foreign-shareholding) — Foreign ownership percentage & remaining quota per stock
- [taifex-institutional-derivatives](https://apify.com/chamarix/taifex-institutional-derivatives) — Institutional futures & options positions (TAIFEX), incl. put/call ratio
- [taiwan-warrants-daily](https://apify.com/chamarix/taiwan-warrants-daily) — Daily quotes, strike, expiry & moneyness for every listed/OTC warrant since 2004
- [taiwan-stock-alerts](https://apify.com/chamarix/taiwan-stock-alerts) — Watch-list, disposition & short-sale suspension alerts
- [taiwan-insider-share-transfers](https://apify.com/chamarix/taiwan-insider-share-transfers) — Insider share-transfer filings (directors, officers, 10% holders) since 2002
- [taiwan-director-shareholdings](https://apify.com/chamarix/taiwan-director-shareholdings) — Monthly director/officer shareholdings & share-pledge ratio since 1999
- [taiwan-block-trades](https://apify.com/chamarix/taiwan-block-trades) — Every block trade (鉅額交易) with price, size & basket constituents since 2005
- [taiwan-shareholder-meetings](https://apify.com/chamarix/taiwan-shareholder-meetings) — Shareholder meeting dates, book closure periods & e-voting since 2005
- [taiwan-emerging-stock-quotes](https://apify.com/chamarix/taiwan-emerging-stock-quotes) — Emerging (興櫃) board quotes, pre-IPO register & history since 2003
- [taiwan-etf-regular-investment](https://apify.com/chamarix/taiwan-etf-regular-investment) — Monthly regular savings plan (定期定額) rankings for stocks & ETFs since 2020
- [taiwan-treasury-stock-buybacks](https://apify.com/chamarix/taiwan-treasury-stock-buybacks) — Every treasury-stock buyback (庫藏股) filing, plan vs execution, since 2000

**Property market:**

- [taiwan-real-estate-transactions](https://apify.com/chamarix/taiwan-real-estate-transactions) — Actual registered sale, presale & lease prices (實價登錄) for all 22 cities since 2012

**Government & civic data:**

- [taiwan-legislator-monitor](https://apify.com/chamarix/taiwan-legislator-monitor) — Legislative Yuan bills, legislators & meetings
- [taiwan-tender-monitor](https://apify.com/chamarix/taiwan-tender-monitor) — Government e-procurement tenders (open calls, awards, failures)

### Data source

Taiwan Stock Exchange Market Observation Post System (公開資訊觀測站), 上市/上櫃/公開發行公司買回自己公司股份彙總統計表. Public data, no login required.

# Actor input Schema

## `recordTypes` (type: `array`):

BUYBACK is one record per filed buyback — the board resolution, the plan, and the execution once the window closes. COMPANY\_TOTAL is the exchange's own all-time total per company. Both come out of the same request, so asking for both is free.

## `markets` (type: `array`):

One request per market, each returning that board's full archive. The emerging board is not offered: §28-2 of the Securities and Exchange Act only lets listed and OTC companies buy their own shares back, and the report is empty for it.

## `startDate` (type: `string`):

Keep buybacks whose board resolution falls on or after this date. Leave empty for everything back to 2000-08-09, the oldest filing on record. Filtering is free — the report has no date parameter, so one request always returns the full archive.

## `endDate` (type: `string`):

Keep buybacks whose board resolution falls on or before this date, inclusive. Leave empty for no upper bound.

## `stockCodes` (type: `array`):

Optional list of company codes to keep, e.g. \['2330', '2317']. Codes are not always numeric — 永豐金證 files as 0009A0 — so they are matched as text.

## `purposes` (type: `array`):

The purpose the company declared to the regulator. Leave empty for all three. Purpose is the single most informative field here: a buyback to transfer shares to employees is a compensation decision, while one to defend the company's credit and shareholder interest is a response to the share price.

## `onlyInProgress` (type: `boolean`):

Keep only buybacks the company has not yet reported as finished — the ones whose execution figures are still blank. Useful as a daily watchlist of open buying programmes. Ignored for COMPANY\_TOTAL records.

## Actor input object example

```json
{
  "recordTypes": [
    "BUYBACK"
  ],
  "markets": [
    "TWSE",
    "TPEX"
  ],
  "startDate": "",
  "endDate": "",
  "stockCodes": [],
  "purposes": [],
  "onlyInProgress": false
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

One record per filed buyback — the board resolution, the declared size, price band and window, and what the company actually executed — plus optional all-time totals per company.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "recordTypes": [
        "BUYBACK"
    ],
    "markets": [
        "TWSE",
        "TPEX"
    ],
    "startDate": "",
    "endDate": "",
    "stockCodes": [],
    "purposes": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("chamarix/taiwan-treasury-stock-buybacks").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "recordTypes": ["BUYBACK"],
    "markets": [
        "TWSE",
        "TPEX",
    ],
    "startDate": "",
    "endDate": "",
    "stockCodes": [],
    "purposes": [],
}

# Run the Actor and wait for it to finish
run = client.actor("chamarix/taiwan-treasury-stock-buybacks").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "recordTypes": [
    "BUYBACK"
  ],
  "markets": [
    "TWSE",
    "TPEX"
  ],
  "startDate": "",
  "endDate": "",
  "stockCodes": [],
  "purposes": []
}' |
apify call chamarix/taiwan-treasury-stock-buybacks --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,chamarix/taiwan-treasury-stock-buybacks"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/qo1eKlxJpi7UNcbPR/builds/zhBNAawwA018CZGxA/openapi.json
