Get futures price history
get_price_historyDaily and intraday price bars for TAIFEX futures by continuous code or month, for the day session, night session or both, tick-by-tick trades, and end-of-day prices of every futures contract including spreads. Data comes from the CubeLV Market Data API (https://cubelv.com/en/mcp/taiwan-futures/): pick a method and pass its arguments in args. The market is TAIFEX (filled in when market is omitted).
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.
futuresTrades (Futures trade-by-trade details): Tick-by-tick trades of a TAIFEX futures contract (monthly contracts and mini-TAIEX weeklies) on a trading day, newest first with paging via before, plus outside (buy-initiated) and inside (sell-initiated) volume in contracts; a match that sweeps several prices yields one row per price. Trading days follow TAIFEX: the night session belongs to the next trading day. Only trades received live since the service last started are available, and only for the last two trading days; sessions shows when collection started and how many contracts were missed. Up to 5000 trades per page. Args: symbol (required): Continuous code (TXF1 = front month, TXF2 = next month, TXF3 and up by expiry order, MXFW1 = nearest mini-TAIEX weekly; resolved at query time), specific month (TXF202611, MXF202610W4) or contract code (TXFK6, MX1K6); date: Trading day, YYYYMMDD (night sessions belong to the next trading day; Friday night belongs to Monday); default the latest day with trades; limit: Trades per page (1-5000, default 200); before: Pagination cursor: nextBefore from the previous page ([HHMMSS[mmm|uuuuuu]:]sequence; only the sequence is used).
futures_daily (Futures daily prices (all contracts)): End-of-day prices of every TAIFEX futures contract, including calendar spreads, for the regular and after-hours (night) sessions: open, high, low, close, change, volume, settlement price and open interest. Updated after 17:30 each trading day; symbols filters by product code (TX, MTX, stock futures such as CDF); up to 31 days per request. Args: market: TAIFEX; symbols: comma-separated codes; from (required), to (required): YYYYMMDD, at most 31 days per request; fields: comma-separated field names; limit: rows per page; cursor: nextCursor from the previous page. Fields: product: TAIFEX product code (TX, MTX, CDF); contract: Expiry yyyymm, weekly yyyymmWn; spreads join two expiries with /; session: regular or after_hours (night session, dated to the trading day it belongs to); changePercent: Percent change (1.5 = 1.5%); settlement: Settlement price; openInterest: Open interest (contracts).
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
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Arguments of the method, as listed in the tool description | |
| lang | No | Language for data labels (industries, statement items, categories) and links: en, ja, ko or vi; default en | |
| method | Yes | Method from the list in the tool description |