# Taiwan Corporate Bonds — 公司債、金融債與寶島債 API (`chamarix/taiwan-corporate-bonds`) Actor

Every corporate, bank and Formosa bond on the Taipei Exchange: issuance terms, outstanding balance, credit ratings, perpetuals and private placements, the 939-bond international register with ISINs, daily OTC trades since 2005 and the exchange's theoretical prices for USD bonds since 2017.

- **URL**: https://apify.com/chamarix/taiwan-corporate-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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Taiwan Corporate Bonds (公司債、金融債與寶島債) API

**Every corporate, bank and Formosa bond on the Taipei Exchange** — issuance terms, outstanding balance, coupon, credit ratings, perpetuals and private placements — plus the **939-bond international bond register with ISINs**, the **daily over-the-counter trade summary back to 2005** and the **exchange's own theoretical prices for USD international bonds back to 2017**, as structured JSON.

Taiwan's non-government bond market is run entirely by the Taipei Exchange (TPEx), and it publishes everything — in eleven separate open-data files that overlap without saying so, a register that is the only place the ISIN appears, a trade summary that exists only as one Excel workbook per day, and three more workbooks per day for fair values. Nobody joins them. This Actor does, and reconciles them against each other on every run.

### Why this data matters

Measured on the exchange's own 2026-10-10 snapshot and the September 2026 trade files, not estimated:

- **NT$3.82 trillion of listed corporate bonds and NT$1.17 trillion of bank bonds are outstanding** across 1,037 and 438 issues — plus US$7.9bn of USD paper in the Formosa file for domestic and dual-listed issuers. The master files give every one of them its coupon, maturity, balance and rating.
- **775 private placements, with no public market and no bond code, are in the master too.** NT$37.7bn outstanding at a median coupon of **4.75%** and up to **15.3%** — real-estate SPVs, unlisted groups and small issuers whose borrowing costs are otherwise invisible. Opt in with `includePrivatePlacements`.
- **145 bonds never mature.** Bank capital instruments (陽信, 台北富邦, 永豐…) published with a blank maturity and a 99-year tenor. The exchange's own search page calls the same 135 listed ones 無到期日 — this Actor's rule agrees with it on all 135.
- **The Formosa market is overwhelmingly callable and foreign.** Of 939 bonds in the international register, 864 are USD, 46 AUD, 18 ZAR, 10 CNY and 1 NZD; 755 carry an issuer call. The biggest issuers are Morgan Stanley, Natixis, Citigroup, JPMorgan and Société Générale.
- **Most of that callable paper is priced far below par.** Of 435 USD bonds the exchange values daily, **278 had a clean theoretical price under 80** on 2026-10-08; the lowest (P20CIBC2, a 30-year callable zero) was **35.52**.
- **Corporate bonds do trade — and the exchange publishes the credit spread.** September 2026: 62 non-government bonds changed hands over the counter, with trades on every one of the 20 sessions — NT$84.4bn in 368 trades on the TWD side alone. The exchange's own spread over government bonds on those trades had a median of **158 bp** (range −14 to 450 bp).

### Output

One dataset, four record types, told apart by `record_type`. An `issue` row — TSMC's 40-year USD Formosa bond, which the exchange lists in two master files at once and which this Actor merges into one row with its ISIN from a third:

```json
{
  "record_type": "issue",
  "snapshot_date": "2026-10-10",
  "bond_code": "F16801",
  "short_name": "P20TSMC1",
  "bond_classes": ["corporate", "formosa"],
  "source_files": ["bond_ISSBD4_data", "bond_ISSBD10_data"],
  "issuer_code": "2330",
  "issuer_name": "台積電",
  "isin": "TW000F168018",
  "series_number": "109-1",
  "issue_date": "2020-09-22",
  "listing_date": "2020-09-22",
  "maturity_date": "2060-09-22",
  "is_perpetual": false,
  "tenor_years": 40,
  "currency": "USD",
  "currency_code": "2",
  "issue_amount": 1000000000,
  "outstanding_amount": 1000000000,
  "coupon_rate_pct": 2.7,
  "coupon_frequency_per_year": 1,
  "issuer_rating_agency": "中華信評",
  "issuer_rating": "twAAA",
  "principal_repayment_description": "發行期間為40年，到期一次還本；惟本公司有提前贖回權，詳細內容請參閱發行辦法。",
  "put_option_date": null,
  "put_option_price": null,
  "is_private_placement": false,
  "underwriter": "920T凱基證券",
  "trustee": "兆豐國際商業銀行股份有限公司",
  "quality_flags": []
}
```

An `otc_trade` row — a Fubon Life subordinated bond on 2026-10-08, joined to its issuer from the master:

```json
{
  "record_type": "otc_trade",
  "date": "2026-10-08",
  "bond_code": "B99513",
  "bond_name": "P14富壽2A",
  "bond_category": "corporate",
  "issuer_name": "富邦人壽",
  "currency": "TWD",
  "duration_years": 7.43,
  "years_to_maturity": 8.88,
  "price_low": 99.9999,
  "price_high": 100.2502,
  "price_avg": 100.2217,
  "yield_low_pct": 3.6656,
  "yield_high_pct": 3.6991,
  "yield_avg_pct": 3.6694,
  "yield_change_pct": -0.0297,
  "trading_value": 113250000.0,
  "face_value_traded": 113000000.0,
  "trade_count": 3,
  "spread_over_government_bp": 168.23,
  "source_file": "BDdcs001.20261008-C.xls",
  "quality_flags": []
}
```

A `theoretical_price` row and the `international_issue` row for the same Citigroup callable:

```json
{
  "record_type": "theoretical_price",
  "date": "2026-10-08",
  "bond_code": "F14241",
  "short_name": "P22CGMHI2",
  "issuer_name": "Citigroup Global Markets Holdings Inc.",
  "pricing_model": "callable_fixed",
  "credit_rating": "A",
  "coupon_rate_pct": 2.93,
  "call_structure": "1.000 x 1.000",
  "price_dirty": 93.298903,
  "accrued_interest": 1.937056,
  "price_clean": 91.361847,
  "currency": "USD"
}
```

```json
{
  "record_type": "international_issue",
  "bond_code": "F14241",
  "issuer_name": "Citigroup Global Markets Holdings Inc.",
  "isin": "XS2410473263",
  "investor_type": "professional",
  "issue_date": "2022-02-15",
  "maturity_date": "2032-02-15",
  "currency": "USD",
  "issue_amount": 70000000,
  "coupon_rate_pct": 2.93,
  "early_redemption": "Applicable",
  "call_structure": "1.000 x 1.000",
  "liquidity_provider": "KGI Bank"
}
```

### Units, stated once

| | Meaning |
|---|---|
| `issue_amount`, `outstanding_amount` | Whole units of **the bond's own currency** — NT$ for TWD bonds, US$ for USD bonds. Never converted. |
| `price_*`, `price_dirty`, `price_clean` | **Per 100 of face value.** 93.29 means 93.29% of par. |
| `trading_value`, `face_value_traded` | In the bond's own currency; a session can mix TWD, USD, AUD and ZAR rows, so never sum across `currency`. |
| `yield_*_pct`, `coupon_rate_pct` | Percent per year. `yield_change_pct` is in percentage points. |
| `spread_over_government_bp` | Basis points, the exchange's own figure (published since 2016). |

### Verification

Nothing here is taken on trust from a single file. Every run, with `crossCheck` on (the default):

- **The masters agree with the exchange's own bond search pages.** The two 公司債/金融債 search pages are served by a different endpoint from the openapi masters. On 2026-10-11 all **1,430 of 1,430** bonds on them matched the master on issue date, maturity (including which ones are perpetual) and amount issued. A date or amount mismatch fails the run.
- **The masters agree with the international register.** 38 bonds appear in both; issue date, amount and maturity agree on **38/38**, and so does the currency.
- **Currency codes are decoded only where proven.** The master's currency column is a bare number with no key. `1` is TWD because all 197 central government bonds carry it; `2` is USD because every master bond that also sits in the international register carries `2` and the register spells out USD for all of them. Both proofs are re-run on every run. Any other code stays raw in `currency_code` — and the foreign-issuer Formosa file, which numbers its currencies differently (its one USD bond carries `1`), is never decoded with this key.
- **Bonds listed by two masters must agree.** The Formosa file repeats 31 bank and 6 corporate USD bonds from the domestic files; all 37 agree field for field and are merged into one row that keeps both `source_files`.
- **Every OTC subtotal is rebuilt.** The trade workbook is cut into blocks, each closed by a 合計 line for one currency (a session can have two TWD and three USD blocks). Each line must equal the exact sum of value, face amount and trade count of its own block — 43/43 in September 2026, and every session of the years checked.
- **The international desk's file agrees with the main one.** BDdas001, published separately, must match BDdcs001 row for row on value, face, count, price and yield — and supplies the ISIN.
- **Theoretical price = accrued interest + clean price** on every row, within 1.5 millionths: each is printed to six decimals, so three roundings can add up to that and no more. Measured worst gap: exactly 0.000001, over 4,286 rows in January 2023 and 435 today.
- **The stored workbooks agree with their openapi copies** to the last digit for the latest session — 23/23, 135/135 and 277/277 on 2026-10-08.
- Outstanding never exceeds issued, maturities follow issue dates, and every volume-weighted average yield sits between its session's low and high yield.

### Where the official sources disagree

They do, and this Actor shows it rather than picking a winner:

- **23 perpetual bank bonds carry a different coupon on the search page than in the master.** All were issued by March 2022 and in every case the master's figure is higher (陽信 P11陽信1: page 2.25%, master 3.19%). The other 1,407 bonds agree to the last digit. Both figures are published — `coupon_rate_pct` from the master and `search_page_coupon_rate_pct` from the page — and the row is flagged `coupon_differs_from_search_page`. *Our reading (not stated by either source): the page shows the coupon at issue and the master the coupon after a reset.*
- **One code, two rows.** On 2026-10-11 the bank-bond master listed G10923 (聯邦銀 perpetual) twice with different coupons (1.92% and 2.8593%) and one copy missing its amount. Both are published and flagged `conflicting_rows_in_source`.
- **The Formosa file prints exact duplicate rows** — 92 of them on 2026-10-11, mostly structured notes. Exact repeats are dropped; nothing else is.
- **Structured notes have no coupon or size.** The master prints 999.999999 as the coupon and 0 as the amount issued for them. Those are nulls here, flagged `coupon_not_published` / `issue_amount_not_published`, not numbers.
- **The printed price range can come out inverted.** The file's prices are each converted from a yield and rounded separately, so when the yields are within a few thousandths the "low" price can print above the "high" (2024-06-20 B64015: 100.698 vs 100.6977, against an orderly 1.395–1.4% yield range) — one row in 3,322 for 2024. Published as printed, flagged `price_range_inconsistent`.
- **A trade with no price is printed as 0.00 in one file and "-" in the other** (a ZAR zero, 2023-01-30). A bond does not trade at zero, so it is null here and flagged `price_not_published`.

### What you can ask for

- `recordTypes` — any of `issues`, `international_issues`, `otc_trades`, `theoretical_prices`.
- `startDate` / `endDate` — the session range for trades and theoretical prices. Leave both empty for the latest published session. Trades start **2005-05-23**; theoretical prices start 2017-12-18 (callable zero-coupon), 2018-12-10 (callable fixed) and 2019-12-16 (non-callable fixed). Which sessions exist is read from the exchange's own month index, so holidays are skipped; a range with no sessions returns nothing rather than failing, while a listed session whose file will not download fails the run.
- `bondCodes` — e.g. `F16801`, `B99513`. Applies to every record type.
- `includePrivatePlacements` — adds the ~770 unlisted private placements to `issues`. Off by default.
- `includeGovernmentBonds` — the OTC file covers government paper too; it is left out by default because [taiwan-government-bonds](https://apify.com/chamarix/taiwan-government-bonds) covers it properly.
- `maxDownloads` — a cap per file series, so a twenty-year range cannot become a surprise bill. A year is about 250 sessions.

### Limitations, stated plainly

- **The two registers are snapshots.** `issues` and `international_issues` describe the market as of the run; bonds that have matured or been redeemed drop out of them. OTC trades of matured bonds still come through, labelled `not_in_current_master` (or `government` for the A/H government series).
- **This is the over-the-counter dealer market only.** Corporate bonds also print on the exchange's electronic EBTS system; those files are not read here.
- **Several master columns are bare codes with no published key** — interest basis, guarantee, repayment, listing status, offering method. They are passed through raw with the free-text description where one exists, never guessed. Only currency is decoded, and only as proven above.
- **Theoretical prices cover USD international bonds only.** The exchange's own footnote says it does not value domestic issuers' bonds because Taiwan has no generally recognised credit-rating standard for them.
- **Warrant bonds and foreign financial bonds have no data today** — those openapi files exist but are empty. Convertibles are in [taiwan-convertible-bonds](https://apify.com/chamarix/taiwan-convertible-bonds).

### Source

Taipei Exchange (證券櫃檯買賣中心): openapi `bond_ISSBD2/3/4/6/7/8/9/10/11_data` (issuance masters), `bond_ISSBD1_data` (only to label government paper), `tpex_international_bond_issue_org` and `_investor` (international register), `BDdos209/215/216UTF` (latest theoretical prices); stored workbooks `BDdcs001` (OTC trade summary), `BDdas001` (international OTC trades) and `BDdos209/215/216` (theoretical prices) from the bond statistics pages; and the `cbSearch` / `cbSearchPro` bond search pages for cross-checking.

### Taiwan Market Data Suite

This Actor is part of a suite of 44 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-corporate-bonds](https://apify.com/chamarix/taiwan-corporate-bonds) — Every corporate, bank & Formosa bond — terms, balance, ratings & ISINs, daily OTC trades since 2005 and USD bond fair values since 2017
- [taiwan-securities-lending-balance](https://apify.com/chamarix/taiwan-securities-lending-balance) — Shares on loan for every stock since 2004 by lending channel, every SLB trade with its borrow fee rate, and each firm's lending book
- [taiwan-ipo-listings](https://apify.com/chamarix/taiwan-ipo-listings) — Every TWSE & TPEx listing application since 2000 from filing to first trading day — review, approval, price, underwriter & withdrawals, plus delistings
- [taiwan-board-directors](https://apify.com/chamarix/taiwan-board-directors) — Every independent director's career and other board seats linked to stock codes, board rosters, chair/CEO duality & director elections
- [taiwan-broker-financials](https://apify.com/chamarix/taiwan-broker-financials) — Every securities firm's monthly balance sheet & P\&L since 2013, full trial balance, and the register of firms & branches
- [taiwan-short-sale-eligibility](https://apify.com/chamarix/taiwan-short-sale-eligibility) — Can it be shorted today? Below-close short list, shares available to borrow, borrow fees, margin haircuts & forced cover dates
- [taiwan-gold-spot](https://apify.com/chamarix/taiwan-gold-spot) — The Taipei Exchange physical gold board since 2015 — daily VWAP, traded high/low, market-maker spread and every print by firm and price
- [taiwan-convertible-bonds](https://apify.com/chamarix/taiwan-convertible-bonds) — Daily bars for every convertible bond on the Taipei Exchange, with conversion price, conversion window, put date & put price
- [taiwan-corporate-action-prices](https://apify.com/chamarix/taiwan-corporate-action-prices) — Capital reductions, par value changes & ETF splits — the official reopening price & adjustment factor for every price discontinuity since 2011
- [taiwan-ipo-subscription](https://apify.com/chamarix/taiwan-ipo-subscription) — Every IPO ballot since 2006 & every competitive auction since 2016 — odds, ticket cost, reserve & bid-to-cover
- [taiwan-intraday-5sec-stats](https://apify.com/chamarix/taiwan-intraday-5sec-stats) — Market-wide order book & all sector indices every 5 seconds since 2004, 3,241 rows a session
- [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-director-compensation](https://apify.com/chamarix/taiwan-director-compensation) — Board pay for 1,950+ companies, parent vs consolidated scope, with EPS, ROE & profit on the same row
- [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-short-sale-volume](https://apify.com/chamarix/taiwan-short-sale-volume) — Daily short sale turnover per stock — margin & borrowed lots, value and implied price, since 2008
- [taiwan-day-trading-stats](https://apify.com/chamarix/taiwan-day-trading-stats) — Day-trading volume, value & ratio per stock since 2014
- [taiwan-odd-lot-trading](https://apify.com/chamarix/taiwan-odd-lot-trading) — Both odd-lot sessions per stock — intraday & after-hours, shares, turnover, OHLC & quotes since 2004
- [taiwan-broker-rankings](https://apify.com/chamarix/taiwan-broker-rankings) — Securities-firm turnover, market share & the top firms in each hot stock on the OTC board since 2007
- [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)

# Actor input Schema

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

Four feeds, written to one dataset and told apart by record_type. 'issues' and 'international_issues' are current-state registers, one request per file. 'otc_trades' and 'theoretical_prices' are one stored file per trading session, so a date range is what they cost.

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

First session for otc_trades and theoretical_prices. Leave both dates empty for the latest published session only. OTC trade files start on 2005-05-23; theoretical prices on 2017-12-18 (callable zero-coupon), 2018-12-10 (callable fixed) and 2019-12-16 (non-callable fixed).

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

Last session, inclusive. Defaults to today when only a start date is given. Has no effect on the two registers, which are snapshots with no date of their own.

## `bondCodes` (type: `array`):

Keep only these bonds, e.g. F16801 (TSMC's 40-year USD Formosa bond), B99513, G11490. Applied to every record type. Leave empty for everything. The full checks still run on the whole market either way.

## `includePrivatePlacements` (type: `boolean`):

The corporate master also lists about 770 privately placed bonds, which have no bond code and no public market but do have issuer, size, coupon and tenor. Off by default because they can never appear in the trades. Only affects 'issues'.

## `includeGovernmentBonds` (type: `boolean`):

The exchange's OTC trade file covers government paper too. It is left out by default — the taiwan-government-bonds Actor covers that market properly. Turn on to get the whole file. Only affects 'otc_trades'.

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

Recompute every subtotal and reconcile the masters against the international register and the exchange's own bond search pages, and the stored price files against their openapi copy. A run whose data fails its own checks ends as FAILED rather than handing you bad numbers. Costs a few extra requests.

## `maxDownloads` (type: `integer`):

A safety cap so an accidental twenty-year range does not become a surprise bill. A year is about 250 sessions per file. The run stops with an explanation instead of fetching past it.

## Actor input object example

```json
{
  "recordTypes": [
    "issues",
    "international_issues",
    "otc_trades",
    "theoretical_prices"
  ],
  "startDate": "",
  "endDate": "",
  "bondCodes": [],
  "includePrivatePlacements": false,
  "includeGovernmentBonds": false,
  "crossCheck": true,
  "maxDownloads": 400
}
```

# Actor output Schema

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

Issuance terms and ratings, the international register, daily OTC trades and theoretical prices — one dataset, told apart by record_type.

# 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": [
        "issues",
        "international_issues",
        "otc_trades",
        "theoretical_prices"
    ],
    "startDate": "",
    "endDate": "",
    "bondCodes": [],
    "includePrivatePlacements": false,
    "includeGovernmentBonds": false,
    "crossCheck": true,
    "maxDownloads": 400
};

// Run the Actor and wait for it to finish
const run = await client.actor("chamarix/taiwan-corporate-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 = {
    "recordTypes": [
        "issues",
        "international_issues",
        "otc_trades",
        "theoretical_prices",
    ],
    "startDate": "",
    "endDate": "",
    "bondCodes": [],
    "includePrivatePlacements": False,
    "includeGovernmentBonds": False,
    "crossCheck": True,
    "maxDownloads": 400,
}

# Run the Actor and wait for it to finish
run = client.actor("chamarix/taiwan-corporate-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 '{
  "recordTypes": [
    "issues",
    "international_issues",
    "otc_trades",
    "theoretical_prices"
  ],
  "startDate": "",
  "endDate": "",
  "bondCodes": [],
  "includePrivatePlacements": false,
  "includeGovernmentBonds": false,
  "crossCheck": true,
  "maxDownloads": 400
}' |
apify call chamarix/taiwan-corporate-bonds --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,chamarix/taiwan-corporate-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/oOrjjCfbbFMZmvr4w/builds/HKmhsS9EaeTFU6yYH/openapi.json
