# Taiwan Government Bond Yields, Curve & Issuance (TPEx) (`chamarix/taiwan-government-bonds`) Actor

Taiwan central government bond data from the TPEx bond zone: daily benchmark yields for the five on-the-run tenors, coupon-bearing and zero-coupon yield curves, per-bond average yields, and the full issuance master. Staleness of every carried-forward quote is stated, not hidden.

- **URL**: https://apify.com/chamarix/taiwan-government-bonds.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/actors/running/actors-in-store.md#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 Government Bonds (中央公債殖利率曲線與發行明細) API

Get structured JSON access to **Taiwan's government bond yield curve** — the benchmark 2/5/10/20/30-year yields, the coupon-bearing treasury curve, the fitted **zero-coupon curve in two models**, the volume-weighted yield of **every bond quoted on the exchange's Electronic Bond Trading System**, and the full issuance master for central and municipal government debt. Daily, back to **2005-01-03**.

Taiwan's government bond curve is the discount rate under every local life insurer's reserves, every NTD corporate spread and every domestic fixed-income mandate. It is published by the Taipei Exchange as legacy Excel workbooks behind a form that rejects most of what you send it. Nobody serves it as an API, free or paid.

### Why this data matters

- **A published yield is not necessarily today's yield, and this Actor tells you which.** The exchange's average yield is volume-weighted across actual trades, and when a bond does not trade it is **carried forward from the last session it did** — the exchange says so in note 5 of its own table. On 2026-08-28 four of the five benchmarks printed a yield with zero trading value behind them, and the 30-year's 1.886% was struck on **2026-05-28, 92 days earlier**. Every row carries `last_trade_date`, `staleness_days` and `reference_is_intraday`, so a stale quote is visible rather than silently modelled as a fresh one. `maxStalenessDays` will drop them for you.
- **Three official files, published separately, reconciled row by row.** The benchmark table, the yield-curve workbook and the all-bonds quote table are produced by different pipelines and must agree on the same bond's yield and price. Across all 20 sessions of August 2026: **100/100 benchmark rows matched the curve file and 100/100 matched the all-bonds table**, exactly. Comparisons use exact decimals, not floats — `1.793` as a float is `1.79299999999999993`, and a float subtraction would manufacture disagreements that are not in the data.
- **The printed basis-point change is reproduced from the two sessions.** `today's yield − previous session's, × 100` equals the published `yield_change_bp` for **95/95 comparisons in August 2026** and 12/12 sampled in November 2005. The identity is keyed on the **tenor slot, not the bond code**: on 2026-08-19 the 2-year benchmark line moved from `A15203R` back to `A15203`, carried the 1.7196% struck on the 18th across the switch, and printed 0.0bp. Keyed on the code that reads as a 5.83bp break the exchange never published.
- **Quotes reconcile against a completely separate issuance API.** Coupon and maturity for each government bond quoted on the EBTS are checked against the 公債發行資料 master, which reaches this Actor over a different endpoint entirely. August 2026: **3,959/3,959 agreed**, zero disagreements. The two codes that did not match — `A15108` and `A15202` — are quoted but absent from the master, which is expected for paper trading ahead of issue (`A15108` matures 2031-09-04 as a 5-year, implying a 2026-09-04 issue, after the master's newest entry of 2026-07-28). They are reported, never silently dropped.
- **公債 is not only central government.** The official issuance master holds **146 central government bonds and 51 municipal construction bonds** — Taipei, Kaohsiung, Tainan and Taoyuan all issue into the same market. `government_level` separates them from the issuer code, which is stable where the printed name is not: the master spells Taipei's issuer both 台北市政府 and 臺北市政府 in the same file.
- **The zero-coupon curve, in both of the exchange's models.** 62 tenors from 1 month to 30 years, fitted with Cubic B-Spline and Svensson, published as decimals in a workbook where every other yield is a percent. This Actor normalises them to percent so one unit holds across the dataset, and states so in the field description rather than leaving you to discover it.

### Output

One record per row of whichever official table you asked for, keyed by `dataset`. The 10-year benchmark, exactly as published on 2026-08-28:

```json
{
  "dataset": "benchmark_yield",
  "date": "2026-08-28",
  "bond_code": "A15106",
  "base_bond_code": "A15106",
  "code_variant": null,
  "tenor_years": 10.0,
  "avg_yield_pct": 1.88,
  "avg_price": 98.8459,
  "yield_change_bp": 0.0,
  "price_change": 0.0003,
  "reference_yield_1200_pct": 1.9,
  "reference_time": null,
  "reference_is_intraday": false,
  "trading_value_ntd": 0.0,
  "last_trade_date": "2026-08-21",
  "staleness_days": 7,
  "source_file": "BDdys100.20260828-C.xls"
}
```

Zero trading value, `reference_is_intraday` false and seven days of staleness: the 10-year "closed" at a yield last struck the previous week. That is what the market did, and it is the kind of thing a curve served without provenance quietly hides.

The zero-coupon curve, same session:

```json
{
  "dataset": "zero_coupon_curve",
  "date": "2026-08-28",
  "model": "Svensson",
  "tenor_label": "1m",
  "tenor_years": 0.083333,
  "spot_rate_pct": 1.4284,
  "source_file": "Curve.20260828-C.xls"
}
```

And the issuance master:

```json
{
  "dataset": "issuance",
  "date": "2026-08-30",
  "bond_code": "A90105",
  "short_name": "90央債甲5",
  "issuer_code": "G001",
  "issuer_name": "中央政府",
  "government_level": "CENTRAL",
  "series_number": "90-5",
  "tranche_number": "甲A",
  "issue_date": "2001-07-17",
  "listing_date": "2001-07-17",
  "maturity_date": "2031-07-17",
  "issue_amount_ntd": 40000000000,
  "outstanding_amount_ntd": 40000000000,
  "coupon_rate_pct": 3.625,
  "coupon_frequency_per_year": 1.0,
  "tenor_years": 30.0,
  "years_to_maturity": 4.8789,
  "source_file": "bond_ISSBD1_data"
}
```

### Input

| Field | Type | Default | Notes |
| --- | --- | --- | --- |
| `datasets` | array | `["benchmarkYields", "yieldCurve"]` | `benchmarkYields`, `yieldCurve`, `zeroCouponCurve`, `bondYields`, `issuance` |
| `startDate` | string | latest session | `YYYY-MM-DD`. EBTS files from 2005-01-03, curve files from 2006-01-02 |
| `endDate` | string | latest session | Inclusive |
| `governmentOnly` | boolean | `true` | Filters `bondYields` to the A and H series |
| `maxStalenessDays` | integer | `0` | Drop yields carried forward longer than this; 0 keeps everything |
| `crossCheck` | boolean | `true` | Run every reconciliation above and write the result to the log |

Leave the dates empty for the latest published session. `yieldCurve` and `zeroCouponCurve` are two sheets of one workbook and cost a single download between them.

#### Volumes per session

| Dataset | Rows | |
| --- | --- | --- |
| `benchmarkYields` | 5 | the on-the-run 2/5/10/20/30-year |
| `yieldCurve` | 5 | the coupon-bearing curve |
| `zeroCouponCurve` | 124 | 62 tenors × 2 models |
| `bondYields` | ~200 government, ~1,450 all bonds | |
| `issuance` | 197 | snapshot, not per session |

### Notes on the source

- The exchange serves an **HTML 404 page under HTTP 200** for a date it holds no file for, so this Actor decides "is there a file" on the workbook's own magic bytes, not the status line. It also throws intermittent **HTTP 520**s on healthy requests, and occasionally answers a month index with an empty table under HTTP 200 — an empty answer for a month that is inside the published archive is retried rather than reported as a month with no sessions.
- Which sessions exist is read from the exchange's own month index rather than guessed from the calendar, so market holidays are simply absent instead of 404-ing.
- The exchange sometimes prints a **second quote line for a bond it is already quoting**, with a single letter appended to the code — both `A15203` and `A15203R` appeared on 2026-08-11, same issue, same maturity, same coupon, different volume-weighted yields, and the benchmark table used the `R` line that session. The exchange does not document what the suffix means and this Actor does not guess: `bond_code` is written through exactly as published, `code_variant` isolates the suffix, and `base_bond_code` links the lines and joins either to the issuance master. Every session with two lines is checked to confirm they still describe the same issue — 19/19 in August 2026.
- A bond can be **quoted before it is issued**, and in that window its coupon is indicative rather than final. 115央債甲8 (`A15108`, issue date 2026-09-04) was quoted at **1.625%** through 2026-08-28 and at its final **1.750%** from 2026-09-01 on, while the issuance master carries 1.750% for the bond outright. This Actor publishes the coupon the exchange printed for that session rather than backfilling the auction result, so a pre-issue row will disagree with the master by design; the reconciliation against the master skips the coupon inside that window and still asserts maturity, which is fixed by the tender announcement. Sort by `date` before treating a coupon as final, or join to the `issuance` dataset, which only ever carries priced paper.

### Taiwan Market Data Suite

This Actor is part of a suite of 29 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:**

- [taiwan-stock-daily-quotes](https://apify.com/chamarix/taiwan-stock-daily-quotes) — Daily OHLCV, VWAP, P/E, price-to-book & dividend yield for every listed/OTC stock since 2004
- [taiwan-index-history](https://apify.com/chamarix/taiwan-index-history) — Daily TAIEX & TPEx index history since 1990 with market turnover, the total-return index & all 273 TWSE indices
- [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-esg-disclosures](https://apify.com/chamarix/taiwan-esg-disclosures) — 21 ESG topics for 1,950+ companies — Scope 1/2/3 emissions, energy, water, waste, pay, board & climate risk
- [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
- [taiwan-futures-daily](https://apify.com/chamarix/taiwan-futures-daily) — Daily bars, settlement price & open interest for all 384 TAIFEX futures contracts since 1998, with the large-trader report
- [taifex-institutional-derivatives](https://apify.com/chamarix/taifex-institutional-derivatives) — Institutional futures & options positions (TAIFEX), incl. put/call ratio
- [taifex-options-chain](https://apify.com/chamarix/taifex-options-chain) — Full options chain by strike & expiry, both sessions, with the exchange's own Delta, since 2001
- [taiwan-warrants-daily](https://apify.com/chamarix/taiwan-warrants-daily) — Daily quotes, strike, expiry & moneyness for every listed/OTC warrant since 2004
- [taiwan-government-bonds](https://apify.com/chamarix/taiwan-government-bonds) — Central government bond benchmark yields, the full yield curve & issuance master, with staleness stated
- [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

Taipei Exchange 債券等殖成交系統 daily files — 指標利率行情表 (BDdys100), 等殖成交各期次債券殖利率及百元價格表 (BDdys020) and 公債殖利率曲線 (Curve) — plus the 公債發行資料 open API (bond\_ISSBD1\_data) used for independent verification of coupon and maturity. Public data, no login required.

# Actor input Schema

## `datasets` (type: `array`):

Which of the exchange's tables to publish. benchmarkYields is the daily headline: the five on-the-run government bonds. yieldCurve is the coupon-bearing treasury curve, zeroCouponCurve the fitted spot curve (Cubic B-Spline and Svensson, ~62 tenors each), and both come from one download. bondYields is the volume-weighted yield of every bond quoted on the Electronic Bond Trading System — about 1,450 lines a session before the government-only filter. issuance is the outstanding-bond master and is a snapshot, so it ignores the date range.

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

First session to fetch. Leave both dates empty for the latest published session. The Electronic Bond Trading System archive starts 2005-01-03; the yield curve files start 2006-01-02.

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

Last session to fetch, inclusive. One stored file is downloaded per dataset per session, so a long range over bondYields is the expensive combination; 400 downloads is the ceiling for a run.

## `governmentOnly` (type: `boolean`):

The Electronic Bond Trading System quotes corporate, financial and international paper in the same table as government debt. With this on, bondYields keeps only the central government (A) and municipal (H) series. It does not affect the other datasets, which are government-only at source.

## `maxStalenessDays` (type: `integer`):

A published average yield is carried forward from the last session the bond actually traded, which the exchange prints as 最近成交日 — so a 30-year benchmark can quote a yield struck three months earlier. Set a number of days to drop rows whose yield is older than that; 0 keeps everything and leaves the judgement to you, using the staleness\_days field.

## `crossCheck` (type: `boolean`):

The benchmark table, the curve file and the all-bonds table are published separately and must agree on the same bond's yield and price; the printed change in basis points must equal the day-over-day difference; and coupon and maturity must match the issuance master, which reaches the Actor over a different API entirely. With this on, all of it is checked and the result written to the log. Costs one extra request when bondYields is selected without issuance.

## Actor input object example

```json
{
  "datasets": [
    "benchmarkYields",
    "yieldCurve"
  ],
  "startDate": "",
  "endDate": "",
  "governmentOnly": true,
  "maxStalenessDays": 0,
  "crossCheck": true
}
```

# Actor output Schema

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

Benchmark government bond yields, the coupon-bearing and zero-coupon yield curves, every bond quoted on the Electronic Bond Trading System, and the outstanding-issue master — each row traceable to the official file it came from.

# 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 = {
    "datasets": [
        "benchmarkYields",
        "yieldCurve"
    ],
    "startDate": "",
    "endDate": "",
    "governmentOnly": true,
    "maxStalenessDays": 0,
    "crossCheck": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("chamarix/taiwan-government-bonds").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 = {
    "datasets": [
        "benchmarkYields",
        "yieldCurve",
    ],
    "startDate": "",
    "endDate": "",
    "governmentOnly": True,
    "maxStalenessDays": 0,
    "crossCheck": True,
}

# Run the Actor and wait for it to finish
run = client.actor("chamarix/taiwan-government-bonds").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 '{
  "datasets": [
    "benchmarkYields",
    "yieldCurve"
  ],
  "startDate": "",
  "endDate": "",
  "governmentOnly": true,
  "maxStalenessDays": 0,
  "crossCheck": true
}' |
apify call chamarix/taiwan-government-bonds --silent --output-dataset

```

## MCP server setup

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

```

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/VR0ppN9wwWAPiLDRK/builds/fnXymGQc7wy6WJqJE/openapi.json
