twmarketdata-com Market Prices API

The Market Prices API from twmarketdata-com — 1 operation(s) for market prices.

Operations 1

GET /v2/datasets/twse-daily-price TWSE 日線價格 / TWSE daily prices #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/twmarketdata-com:twmarketdata-com-market-prices-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

twmarketdata-com-market-prices-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TW Market Data Market Prices API
  description: 台股資料 API,為 AI agent、量化研究與金融產品開發設計。此文件提供 machine-readable 的公開資料端點摘要,詳細欄位請以對應 docs endpoint 頁面為準。
  version: 0.1.0
  x-spec-version: 1.0.0
  x-generated-at: '2026-08-10T15:44:43.277Z'
servers:
- url: https://api.twmarketdata.com
  description: The customer API. sk_live_ keys authenticate here, in the X-API-Key header. This is the host that issues those keys and the host that validates them.
security:
- ApiKeyAuth: []
tags:
- name: Market Prices
paths:
  /v2/datasets/twse-daily-price:
    get:
      summary: TWSE 日線價格 / TWSE daily prices
      description: 上市股票日線價格資料,適合價格走勢、回測與技術指標輸入。
      parameters:
      - $ref: '#/components/parameters/TickerParam'
      - $ref: '#/components/parameters/StartDateParam'
      - $ref: '#/components/parameters/EndDateParam'
      - $ref: '#/components/parameters/LimitParam'
      responses:
        '200':
          description: TWSE daily price rows returned successfully.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/DatasetResponseEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/TwseDailyPriceRow'
              examples:
                standard:
                  value:
                    data:
                    - ticker: '2330'
                      market: TWSE
                      trade_date: '2026-04-30'
                      open: 812
                      high: 818
                      low: 805
                      close: 810
                      volume: 21500000
                      turnover: 17415000000
                      provider: twse
                      source_role: official_twse_daily_price
                    meta:
                      dataset: twse-daily-price
                      request_id: req_twse_001
                      generated_at: '2026-05-23T00:00:00Z'
                      ticker: '2330'
                      market: TWSE
                      date_from: '2026-04-01'
                      date_to: '2026-04-30'
                      source_policy: official/public-first
                      freshness: daily-close
                      currency: TWD
                      unit_semantics: shares
                    pagination:
                      limit: 50
                      next_cursor: null
                      has_more: false
                    data_gaps: []
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-data-status: production
      x-data-gaps: Response may include data_gaps and coverage/freshness caveats.
      operationId: get_twse_daily_price
      tags:
      - Market Prices
      externalDocs:
        description: 對應 API 文件
        url: https://twmarketdata.com/docs/api/market-prices/twse-daily-price
      x-source-policy: official/public-first with explicit lineage and data_gaps.
      x-coverage-note: TWSE daily price is a core dataset, but availability can still vary by date/ticker and ingestion state.
      x-data-gaps-policy: Preserve and surface data_gaps; do not auto-fill missing observations.
      x-dataset-page: https://twmarketdata.com/datasets/twse-daily-price
      x-docs-page: https://twmarketdata.com/docs/api/market-prices/twse-daily-price
      x-freshness-note: Daily close oriented dataset; verify freshness fields before downstream decisions.
      x-stability: stable
      security: []
components:
  schemas:
    PaginationMeta:
      type: object
      properties:
        limit:
          type:
          - integer
          - 'null'
          minimum: 1
          maximum: 1000
        next_cursor:
          type:
          - string
          - 'null'
        has_more:
          type:
          - boolean
          - 'null'
      example:
        limit: 50
        next_cursor: null
        has_more: false
      additionalProperties: true
    DataGap:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        severity:
          type: string
          enum:
          - info
          - warning
          - error
        scope:
          type:
          - string
          - 'null'
        field:
          type:
          - string
          - 'null'
        source:
          type:
          - string
          - 'null'
        observed_at:
          type:
          - string
          - 'null'
          format: date-time
      additionalProperties: true
      example:
        code: coverage_rollout_gap
        message: 部分日期尚未完成來源補齊。
        severity: warning
        scope: dataset
        field: null
        source: official source rollout
        observed_at: '2026-05-23T00:00:00Z'
    DatasetMeta:
      type: object
      properties:
        dataset:
          type:
          - string
          - 'null'
        request_id:
          type:
          - string
          - 'null'
        generated_at:
          type:
          - string
          - 'null'
          format: date-time
        ticker:
          type:
          - string
          - 'null'
        market:
          type:
          - string
          - 'null'
        date_from:
          type:
          - string
          - 'null'
          format: date
        date_to:
          type:
          - string
          - 'null'
          format: date
        source_policy:
          type:
          - string
          - 'null'
        freshness:
          type:
          - string
          - 'null'
        currency:
          type:
          - string
          - 'null'
        unit_semantics:
          type:
          - string
          - 'null'
      additionalProperties: true
    DatasetResponseEnvelope:
      type: object
      required:
      - data
      properties:
        data:
          type: array
          items:
            type: object
            additionalProperties: true
        meta:
          $ref: '#/components/schemas/DatasetMeta'
        pagination:
          $ref: '#/components/schemas/PaginationMeta'
        data_gaps:
          type: array
          items:
            $ref: '#/components/schemas/DataGap'
      example:
        data: []
        meta:
          dataset: twse-daily-price
          request_id: req_example_001
          generated_at: '2026-05-23T00:00:00Z'
          ticker: '2330'
          market: TWSE
          date_from: '2026-01-01'
          date_to: '2026-01-31'
          source_policy: official/public-first
          freshness: daily-close
          currency: TWD
          unit_semantics: shares
        pagination:
          limit: 50
          next_cursor: null
          has_more: false
        data_gaps: []
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
            message:
              type: string
            request_id:
              type:
              - string
              - 'null'
          additionalProperties: true
      examples:
        invalid_query:
          value:
            error:
              code: INVALID_QUERY
              message: 查詢參數格式錯誤。
              request_id: req_invalid_001
        unauthorized:
          value:
            error:
              code: UNAUTHORIZED
              message: 缺少或無效的 API key。
              request_id: req_auth_001
        rate_limited:
          value:
            error:
              code: RATE_LIMIT_EXCEEDED
              message: 請求過於頻繁,請稍後重試。
              request_id: req_rate_001
        internal_error:
          value:
            error:
              code: INTERNAL_ERROR
              message: 伺服器暫時無法處理請求。
              request_id: req_internal_001
    TwseDailyPriceRow:
      type: object
      properties:
        ticker:
          type: string
        market:
          type:
          - string
          - 'null'
        date:
          type: string
          format: date
        open:
          type:
          - number
          - 'null'
        high:
          type:
          - number
          - 'null'
        low:
          type:
          - number
          - 'null'
        close:
          type:
          - number
          - 'null'
        volume:
          type:
          - integer
          - 'null'
        provider:
          type:
          - string
          - 'null'
        source_role:
          type:
          - string
          - 'null'
      additionalProperties: true
  parameters:
    LimitParam:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 1000
      description: 回傳筆數上限。
    StartDateParam:
      name: start_date
      in: query
      required: false
      schema:
        type: string
        format: date
      description: 查詢起始日期(YYYY-MM-DD)。
    EndDateParam:
      name: end_date
      in: query
      required: false
      schema:
        type: string
        format: date
      description: 查詢結束日期(YYYY-MM-DD)。
    TickerParam:
      name: symbol
      in: query
      required: true
      schema:
        type: string
      description: 股票代碼(對應 ticker),例如 2330。
  responses:
    InternalServerError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal_error:
              value:
                error:
                  code: INTERNAL_ERROR
                  message: 伺服器暫時無法處理請求。
                  request_id: req_internal_001
    TooManyRequests:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rate_limited:
              value:
                error:
                  code: RATE_LIMIT_EXCEEDED
                  message: 請求過於頻繁,請稍後重試。
                  request_id: req_rate_001
    BadRequest:
      description: Invalid query parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalid_query:
              value:
                error:
                  code: INVALID_QUERY
                  message: 查詢參數格式錯誤。
                  request_id: req_invalid_001
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unauthorized:
              value:
                error:
                  code: UNAUTHORIZED
                  message: 缺少或無效的 API key。
                  request_id: req_auth_001
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Use X-API-Key header with your dashboard-issued API key.
externalDocs:
  description: TW Market Data developer docs
  url: https://twmarketdata.com/docs