Skip to main content
Glama

Taiwan ETFs

Get ETF price history

get_price_history
Read-onlyIdempotent

Daily and intraday price bars and trade-by-trade details for TWSE- and TPEx-listed ETFs. Data comes from the CubeLV Market Data API (https://cubelv.com/en/mcp/taiwan-etfs/): pick a method and pass its arguments in args. Quotes, price history and holdings accept only ETF codes (search_etfs lists them).

Methods:

  • history (Candlesticks (OHLCV)): Daily, weekly, monthly and intraday candles. TWSE/TPEx stocks and ETFs: 1d, 1w, 1mo (optionally adjusted for ex-rights/ex-dividend and splits) and 1m, 3m, 5m, 15m, 30m, 60m; today's daily candle appears after the 13:30 close (volume is board-lot trading until the exchange daily file arrives around 15:00, then it also includes odd lots and after-hours fixed-price trading). TAIFEX futures: daily candles for all products since 1998 (regular session) via continuous codes (TXF1, CDF3, MXFW1) or a specific month (TXF202611). TAIFEX intraday candles (1m, 3m, 5m, 15m, 30m, 60m) use the front/next continuous code (product code plus 1 or 2) or MXFW1 and include the current session: TAIEX TXF, mini TAIEX MXF, electronics EXF, finance FXF, non-finance non-electronics XIF and TWD gold TGF since 2011-01-03, gold GDF since 2011-01-05, TOPIX TJF since 2015-12-21, MXFW1 since 2013-07-31; US index futures Dow UDF and S&P 500 SPF since 2017-05-15, Nasdaq-100 UNF since 2019-10-01, PHLX Semiconductor SXF since 2023-12-18. The night session of US index futures (session night, 15:00-05:00 Taipei time, dated to the next trading day) covers US regular trading hours, so for intraday Nasdaq, Dow, S&P 500 or semiconductor index history over several years query UNF1, UDF1, SPF1 or SXF1 (volume is TAIFEX contracts, far smaller than CME). Sessions: 1m and 3m have day and night sessions (night since TAIFEX opened it: TXF, MXF, UDF, SPF 2017-05-15; UNF, SXF from their first day; EXF 2018-11-20; GDF, TGF 2018-07-03; TJF 2024-12-10; FXF 2025-06-24; XIF has no night session); 5m to 60m: TXF, MXF, SPF, UNF, SXF day and night, UDF night only, EXF, FXF, XIF, GDF, TGF, TJF, MXFW1 day only. Front/next month of FTSE Taiwan TWN, MSCI Taiwan MTW, Hang Seng HSI, FTSE China A50 CN and Nikkei NK have day-session 5m to 60m only (since 2026-03-27), no 1m or 3m. US stocks: 1d, 60m, 30m, 15m, 5m are split/dividend-adjusted, 1m and 3m are raw; 5m to 60m are the same 1-minute data as 1m (bundle files where available, otherwise aggregated from 1m and adjusted like the daily candles), so every day with 1m also has 5m to 60m: the market-wide range is the dataset us_minute_bars, and each symbol starts at its own first 1m day. Taiwan index daily candles exist for TAIEX, the TPEx index and sector indices (see dailyHistory in indices); warrants have daily candles only. Returns the most recent limit candles within from-to (default 240, max 8000); page backwards through long histories (limit 8000 per segment for years of intraday candles) by setting to to the day before the earliest candle returned until the result is empty. Args: market (required): Market: TWSE, TPEX, TAIFEX, NASDAQ, NYSE or AMEX (US ETFs listed on NYSE Arca or Cboe BZX use AMEX); a market/symbol mismatch returns 404; symbol (required): Symbol (US preferred shares like ABR$D). TAIFEX daily: continuous code (TXF1, CDF3, MXFW2) or specific month (TXF202611, MXF202610W4); TAIFEX intraday: front/next continuous code (TXF1, UNF1, UDF2) or MXFW1; from: Start date, YYYYMMDD; to: End date, YYYYMMDD; limit: Most recent N candles within from-to (default 240, about one year of daily candles; max 8000, larger values count as 8000). For earlier or longer histories read in segments with from and to: limit 8000 per segment for years of intraday candles, setting the next segment's to to the day before the earliest candle returned, until the result is empty; interval: Candle interval: 1d, 1w, 1mo, 1m, 3m, 5m, 15m, 30m, 60m. Taiwan stocks: all; TAIFEX: 1d for all contracts, intraday for front/next continuous codes and MXFW1 (products, sessions and start dates in the summary); US stocks: 1d, 60m, 30m, 15m, 5m, 3m, 1m. US 5m, 15m, 30m, 60m and 1m are the same data: bundle files where available, otherwise aggregated from regular-session 1m and adjusted to the same day's adjusted daily candle (unfinished candles are not returned); US 3m is aggregated from raw 1m. Each candle's at is its end time; adjusted: Adjust Taiwan daily/weekly/monthly candles for ex-rights/ex-dividend and splits (available from 20030505 for TWSE and 20000901 for TPEx; an earlier from returns 422). US daily and 5m-60m candles are always adjusted; session: Intraday session: day = regular session, night = after-hours session (TAIFEX night session 15:00-05:00 Taipei time, dated to the next trading day), all = both (default). TAIFEX daily candles cover the regular session only.

  • trades (Trade-by-trade details and buy/sell pressure): Tick-by-tick trades of one Taiwan stock on a trading day (newest first, page with before) plus outside (buy-initiated), inside (sell-initiated) and unclassified volume; available from 2018-12-07 (not for warrants). If date is omitted, the latest trading day with intraday trades is used (looking back up to 5 trading days). outerVolume, innerVolume, unknownVolume and totalTrades are whole-day totals independent of limit and before, so use limit=1 when only totals are needed. One symbol per request; intraday requests replay the whole day and get slower with more trades, so for many symbols use the sides field of quotes, or subscribe for live updates. Up to 5000 trades per page. Args: market (required): Market: TWSE or TPEX; symbol (required): Symbol (uppercase letters/digits and . _ -, up to 32 chars); date: Trading day, YYYYMMDD, not after today; when given only that day is queried; limit: Trades per page (1-5000, default 200); before: Pagination cursor: nextBefore from the previous page (HHMMSS[mmm|uuuuuu][:sequence]).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "method": "<method>"
    },
    "name": "get_price_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNoArguments of the method, as listed in the tool description
langNoLanguage for data labels (industries, statement items, categories) and links: en, ja, ko or vi; default en
methodYesMethod from the list in the tool description

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With readOnly, idempotent and destructive annotations already covering safety, the description adds extensive behavioral context beyond them: CubeLV API source, intraday replay slowdown, 2018-12-07 trade availability, latest-trading-day fallback, 404/422 errors, adjustment start dates, session windows, and pagination limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and there is a recognizable Methods/Args structure, but the history section is a wall of futures start dates and repeated limit/pagination instructions far beyond what an agent needs to invoke. The return-limit and pagination text is repeated almost verbatim, and the excessive length obscures the key call requirements.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex multi-method tool with nested args and no output schema, the description supplies method behavior, argument formats, constraints, errors, pagination, and some return semantics such as candle end times and whole-day trade totals. Despite verbosity, nothing critical for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers three top-level parameters but only says args follow the description; the description carries all nested method semantics. It defines market mappings, symbol formats, from/to, limit defaults and max, segmentation strategy, interval availability, adjusted, session, date, and before.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

It opens with a specific verb and resource, 'price bars and trade-by-trade details,' and explains the method/args pattern, so the agent knows it fetches historical bars and trades. However, it labels the scope as TWSE/TPEx ETFs and says price history accepts only ETF codes, then documents TAIFEX futures and US stocks, which is an internal scope inconsistency.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear method selection guidance between history and trades and concrete conditions such as using adjusted for ex-rights/dividends, session day/night/all, limit=1 for totals, and before for pagination. It also names search_etfs for codes and quotes for many-symbol trade pressure, but lacks a clean when-to-use-vs-get_quotes statement for the main history method.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources