# Taiwan Futures Daily — TAIFEX 期貨日行情 API (`chamarix/taiwan-futures-daily`) Actor

Every TAIFEX futures contract's daily bar, back to the first TAIEX futures session on 1998-07-21. OHLC, volume, settlement price and open interest for 384 contracts across both sessions, plus the large-trader open interest report.

- **URL**: https://apify.com/chamarix/taiwan-futures-daily.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 Futures Daily (TAIFEX 期貨日行情) API

Get structured JSON access to **every TAIFEX futures contract's daily bar**, back to **1998-07-21 — the first TAIEX futures session ever traded**. Open, high, low, close, change, volume, settlement price, open interest and the last best bid/ask, in both the daytime and overnight sessions, for all **384 contracts** the exchange currently lists.

TX (TAIEX futures) is the headline contract — Taiwan's most heavily traded derivative — but the same download covers the mini and micro versions, the sector indices, gold, Brent, the offshore index futures on the S\&P 500, Nasdaq-100, Dow, TOPIX and FTSE 100, the FX futures, and every single-stock future.

### Why this data matters

- **Twenty-eight years of history, on the deepest archive TAIFEX serves.** The download genuinely reaches 1998-07-21: that session comes back with five TX rows, and the day before it comes back empty. Ranges before it are rejected up front rather than returning an empty run. *This archive is far deeper than the exchange's institutional-position downloads, which are capped at a rolling three-year window* — do not assume one TAIFEX endpoint's history from another's.
- **Every row recovers the reference price the exchange measured its change against.** The exchange prints a change but never says what it measured against, and on an ex-dividend day the answer is *not* the previous settlement price. Measured across the whole market for 2026-08-10 → 2026-09-08 (51,861 rows): `close − previous settlement` equals the printed change on **15,794 of 15,910** rows — and every one of the 116 exceptions is a single-stock future on an ex-dividend date. So the Actor recovers the basis the exchange actually used (`reference_price`) and publishes the gap as `reference_adjustment`. The proof that the recovery is right rather than merely arithmetic: the printed 漲跌% reproduces from the recovered basis for **all 15,910 rows**, where the unadjusted basis reproduces only 15,816.
- **Those adjustments match the stock exchange's own dividend table.** Spot-checked against TWSE's 除權息計算結果 for 2026-08-11: 元大台灣價值高息 (00940 / `SUF`) 0.05 and 第一金 (2892 / `DPF`) 1.30 match the published 權值+息值 exactly; 合庫金 (5880 / `LOF`) 1.417074 and 群益證 (6005 / `JXF`) 4.268612 appear here as 1.40 and 4.25 — the same figure floored to the futures tick. Two exchanges, one number.
- **The large-trader open interest report, reconciled against the quotes.** `LARGE_TRADER_OI` records give you the top five and top ten traders' long and short open interest per contract, split between all traders and specific institutions, with each side's share of the market worked out. The exchange compiles it from position files rather than from the trade tape, which makes it an independent measurement — and on 2026-09-08 its market open interest reproduced exactly from the downloaded quotes for **343 of 346 contract groups**. The three that don't are named and explained below, not papered over.
- **Cross-validated value by value against an independently built feed.** With `crossCheck` on, the parsed download is compared against the exchange's open-data mirror of the same session. On 2026-09-08: **2,270 contracts on both sides, 29,510 values compared, zero disagreements.**
- **Nobody serves this in English, or for free.** The source is a Big5-encoded CSV behind a form that fails silently in three different ways if you get the parameters wrong.

### Output

One record per contract, per expiry, per session. A real TX (TAIEX futures) September bar, as published:

```json
{
  "record_type": "QUOTE",
  "date": "2026-09-08",
  "contract_code": "TX",
  "contract_name": "臺股期貨",
  "contract_name_en": "TAIEX Futures",
  "expiry_code": "202609",
  "expiry_month": "2026-09",
  "expiry_kind": "MONTHLY",
  "expiry_week": null,
  "is_calendar_spread": false,
  "trading_session": "REGULAR",
  "open": 47480.0,
  "high": 47593.0,
  "low": 46934.0,
  "close": 46980.0,
  "change": -482.0,
  "change_pct": -1.02,
  "volume": 44455,
  "settlement_price": 46955.0,
  "open_interest": 102168,
  "best_bid": 46977.0,
  "best_ask": 46980.0,
  "historical_high": 49651.0,
  "historical_low": 24962.0,
  "previous_settlement_price": 47462.0,
  "reference_price": 47462.0,
  "reference_adjustment": 0.0,
  "change_matches_previous_settlement": true,
  "large_trader_group": "TX",
  "trading_halt": false,
  "source_report": "TAIFEX futDataDown"
}
```

Both printed figures reconcile against the basis: `46980 − 47462 = −482`, and `−482 / 47462 × 100 = −1.0155…`, which rounds to the −1.02 the exchange printed.

And the large-trader report for the same contract and session:

```json
{
  "record_type": "LARGE_TRADER_OI",
  "date": "2026-09-08",
  "large_trader_group": "TX",
  "contract_name": "臺股期貨(TX+MTX/4)",
  "settlement_month_code": "202609",
  "expiry_month": "2026-09",
  "large_trader_scope": "SETTLEMENT_MONTH",
  "trader_type": "ALL_TRADERS",
  "top5_buy_oi": 72587,
  "top5_sell_oi": 51655,
  "top10_buy_oi": 79392,
  "top10_sell_oi": 71323,
  "market_open_interest": 110572,
  "top5_buy_share_pct": 65.6468,
  "top5_sell_share_pct": 46.7162,
  "top10_buy_share_pct": 71.8012,
  "top10_sell_share_pct": 64.5037,
  "includes_mini_contracts": true,
  "large_trader_bounds_ok": true,
  "source_report": "TAIFEX OpenInterestOfLargeTradersFutures"
}
```

### Input

| Field | What it does |
| --- | --- |
| `contracts` | Contract codes: `TX`, `MTX`, `TMF`, `TE`, `TF`, `XIF`, `GDF`, single-stock codes such as `CDF` (TSMC), or `ALL`. Empty means `TX`. |
| `startDate` / `endDate` | `YYYY-MM-DD`. Empty means the latest session. |
| `tradingSession` | `ALL`, `REGULAR` (daytime) or `AFTER_HOURS` (overnight). |
| `includeCalendarSpreads` | Include the month-against-month spread rows. Off by default. |
| `onlyTraded` | Drop contracts that did not trade. |
| `minOpenInterest` | Keep only contracts carrying at least this many open positions. |
| `includeLargeTraderOI` | Add the large-trader open interest records. Latest session only. |
| `crossCheck` | Compare against the exchange's open-data mirror. |

The exchange serves **at most 31 days per download**, so a range is split into monthly requests: 24 per run for named contracts, 3 when `ALL` is asked for (a whole-market session is ~2,400 rows). A contract listed later than your start date simply returns nothing for the years before it existed.

### Things this dataset is honest about

**TAIEX futures are `TX` here, not the `TXF` on the exchange's product pages.** Ask this download for `TXF` and it answers HTTP 200 with a header and no rows — a run that silently produces nothing rather than failing. `TX` is the code that works, and it is the code the 1998 archive uses too.

**Calendar spreads are a different instrument, and they are off by default.** The exchange quotes each contract's month-against-month spreads as rows of their own — 436 of 2,415 rows on 2026-09-08. A spread is an order type rather than a position: its close is a price difference (and its best bid can be negative), and the exchange prints no settlement price, no open interest and no change for one. Summing volume or open interest across a download that mixes them in would double-count, so `includeCalendarSpreads` defaults to off. Every run still checks all 436 of them leave those three columns blank, whether or not they get published.

**The `價差對單式委託成交量` column is not additive with volume.** It appears on spread rows only — blank on all 1,979 outright rows of that session — and counts the part of a spread's activity matched against outright orders. It is published as `spread_vs_single_volume` and left out of `volume`, as the exchange has it.

**The two sessions share a trading date.** TAIFEX runs a daytime session (一般) and an overnight one (盤後) and prints a row for each under the same date. Only the daytime rows carry a settlement price and open interest; the overnight rows print a dash for both. A primary key that leaves `trading_session` out will overwrite half your data.

**Run before the daytime session publishes and you get yesterday, plus last night.** The overnight session trades ahead of the day it is filed under, so at 10am the newest date in the download holds overnight rows only. Asked for "the latest session" the Actor publishes the most recent **complete** session together with the overnight rows filed after it, and says so in the log.

**The large-trader report folds three contracts' mini siblings in, and does not reconcile for them.** Its own product label for TX reads 臺股期貨(TX+MTX/4): the mini and micro contracts are converted into full-size units and included, which is why `MTX`, `TMF`, `ZEF` and `ZFF` never appear in it on their own. Because the conversion happens per position before the market total is struck, the published total cannot be rebuilt from the quote file's aggregates — on 2026-09-08 the report gives TX 118,585 against 108,323 outright contracts here, TE 490 against 410, TF 504 against 418. Those three carry `includes_mini_contracts: true` and `market_oi_matches_quotes: null` rather than a fabricated conversion. The other 343 groups reconcile exactly and say so.

| 2026-09-08 | Large-trader report | Summed from the quotes | Reconciles |
| --- | --- | --- | --- |
| 343 contract groups | — | — | **exactly** |
| TX 臺股期貨 | 118,585 | 108,323 | folds in MTX and TMF |
| TE 電子期貨 | 490 | 410 | folds in ZEF |
| TF 金融期貨 | 504 | 418 | folds in ZFF |

**Single-stock futures report under a two-letter family.** The large-trader report files `CDF` and `CD1` alike under `CD`, while the index and commodity contracts keep their three-letter code. `large_trader_group` gives you that mapping on every quote row; the quote rows themselves stay exactly as the exchange published them.

**The large-trader report covers the latest session only, and not every expiry.** It publishes the nearest settlement month and an all-months total (plus a weekly-contracts line where those exist), which `large_trader_scope` labels. A historical run gets quotes and no large-trader records. Note also that `ALL_TRADERS` and `SPECIFIC_INSTITUTIONS` are nested, not disjoint — the institutional figures are a subset.

**The open-data mirror drops untraded spreads.** On 2026-09-08 it carried 2,270 of the download's 2,415 rows; all 145 it lacked were calendar spreads with zero volume. That gap is reported separately from a disagreement, of which there were none across 29,510 compared values.

**A dash is not a zero.** The exchange prints a row for every listed expiry whether or not anyone traded it, with a dash where the prices would be. Those become `null`, not `0.0` — writing a zero close into an untraded far-month contract would invent a price that never existed. The mirror spells the same absence `NULL`, and that is read as null too.

**Every column is read by name.** The 19-column layout has been stable across every era sampled — 2005, 2010, 2015, 2020, 2025 and 2026 all publish the same header — but a column that moves will not silently shift into the wrong field, and a column that disappears fails the run instead of quietly producing garbage.

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

Taiwan Futures Exchange 期貨每日交易行情下載 (futDataDown) and its 商品代碼查詢 product list, plus the 期貨每日交易行情 (DailyMarketReportFut) and 期貨大額交易人未沖銷部位 (OpenInterestOfLargeTradersFutures) open-data feeds used for independent verification. Public data, no login required.

# Actor input Schema

## `contracts` (type: `array`):

Contract codes as this export prints them: TX (TAIEX futures), MTX (mini), TMF (micro), TE, TF, XIF, GDF, or a stock-futures code such as CDF (TSMC). Note the export writes TAIEX futures as TX, not the TXF shown on the exchange's product pages — asking for TXF returns no rows. Use ALL for every listed contract, roughly 2,400 rows a session, capped at three monthly downloads. Leave empty for TX.

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

First trading day to fetch. Leave both dates empty for the latest session. The archive starts at 1998-07-21, the first TAIEX futures session; a contract listed later simply returns nothing for the years before it existed.

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

Last trading day to fetch, inclusive. The exchange serves at most 31 days per download, so a range is split into monthly requests — 24 of them per run for named contracts, 3 when ALL is asked for.

## `tradingSession` (type: `string`):

TAIFEX runs two sessions a day and publishes a row for each. REGULAR (一般) is the daytime session and the only one carrying settlement prices and open interest; AFTER\_HOURS (盤後) is the overnight session, which prints volume and prices but a dash for open interest. Both share the same trading date, so a key that leaves the session out overwrites half the data.

## `includeCalendarSpreads` (type: `boolean`):

The exchange quotes each contract's month-against-month spreads as rows of their own, roughly one row in five. A spread is an order type rather than a position: its close is a price difference, and the exchange prints no settlement price, no open interest and no change for it. Off by default so that summing volume or open interest over the output cannot double-count; the consistency checks run over the whole download either way.

## `onlyTraded` (type: `boolean`):

Drops rows with zero volume. The exchange prints a row for every listed expiry whether or not anyone traded it, with dashes where the prices would be.

## `minOpenInterest` (type: `integer`):

Keeps only contracts carrying at least this many open positions. Applies to the regular session, since after-hours rows do not report open interest.

## `includeLargeTraderOI` (type: `boolean`):

Adds LARGE\_TRADER\_OI records: the top five and top ten traders' long and short open interest per contract group, split between all traders and specific institutions, with each side's share of the market worked out. The exchange compiles it from position files rather than from trades, so it doubles as an independent check on the quotes — the run reconciles its market open interest against the downloaded quotes and reports the result. Covers the latest session only; a historical run gets nothing extra. Costs one request.

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

The exchange publishes the latest session a second time through its open-data API. With this on, the parsed download is compared against it value by value and the result is written to the log. Costs one extra request.

## Actor input object example

```json
{
  "contracts": [
    "TX"
  ],
  "startDate": "",
  "endDate": "",
  "tradingSession": "ALL",
  "includeCalendarSpreads": false,
  "onlyTraded": false,
  "minOpenInterest": 0,
  "includeLargeTraderOI": true,
  "crossCheck": true
}
```

# Actor output Schema

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

One record per contract per expiry per session — open, high, low, close, change, volume, settlement price and open interest, with the reference price the exchange measured the change against recovered on every row, plus the large-trader open interest report for the latest session.

# 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 = {
    "contracts": [
        "TX"
    ],
    "startDate": "",
    "endDate": "",
    "tradingSession": "ALL",
    "includeCalendarSpreads": false,
    "onlyTraded": false,
    "minOpenInterest": 0,
    "includeLargeTraderOI": true,
    "crossCheck": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("chamarix/taiwan-futures-daily").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 = {
    "contracts": ["TX"],
    "startDate": "",
    "endDate": "",
    "tradingSession": "ALL",
    "includeCalendarSpreads": False,
    "onlyTraded": False,
    "minOpenInterest": 0,
    "includeLargeTraderOI": True,
    "crossCheck": True,
}

# Run the Actor and wait for it to finish
run = client.actor("chamarix/taiwan-futures-daily").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 '{
  "contracts": [
    "TX"
  ],
  "startDate": "",
  "endDate": "",
  "tradingSession": "ALL",
  "includeCalendarSpreads": false,
  "onlyTraded": false,
  "minOpenInterest": 0,
  "includeLargeTraderOI": true,
  "crossCheck": true
}' |
apify call chamarix/taiwan-futures-daily --silent --output-dataset

```

## MCP server setup

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

```

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/OLfVCyEthrq5zFBVJ/builds/ak6DoNimEFtF9vgem/openapi.json
