{
  "openapi": "3.0.1",
  "info": {
    "title": "Taiwan Warrants Daily Quotes — 權證行情 API",
    "description": "Every listed and OTC warrant in Taiwan, priced daily: ~40,000 warrants a session with OHLC, volume, the underlying's own close, and the strike, exercise ratio and expiry joined on — plus moneyness, intrinsic value, premium and leverage computed from them. TWSE sessions reach back to 2004-02-11.",
    "version": "0.1",
    "x-build-id": "TltoWpDftKywi6eIS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/chamarix~taiwan-warrants-daily/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-chamarix-taiwan-warrants-daily",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/chamarix~taiwan-warrants-daily/runs": {
      "post": {
        "operationId": "runs-sync-chamarix-taiwan-warrants-daily",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/chamarix~taiwan-warrants-daily/run-sync": {
      "post": {
        "operationId": "run-sync-chamarix-taiwan-warrants-daily",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "markets": {
            "title": "Markets",
            "type": "array",
            "description": "TWSE carries ~31,000 warrants and answers for any session back to 2004-02-11. TPEX carries ~9,500 and publishes only the latest session — it has no dated warrant endpoint at all, so a historical range returns TWSE rows only.",
            "items": {
              "type": "string",
              "enum": [
                "TWSE",
                "TPEX"
              ],
              "enumTitles": [
                "TWSE — listed warrants (上市權證)",
                "TPEX — OTC warrants (上櫃權證)"
              ]
            },
            "default": [
              "TWSE",
              "TPEX"
            ]
          },
          "startDate": {
            "title": "Start date (YYYY-MM-DD)",
            "pattern": "^(|\\d{4}[-/]?\\d{2}[-/]?\\d{2})$",
            "type": "string",
            "description": "First trading day to fetch. Leave both dates empty for the latest session, which is what most runs want. The oldest session the exchange will answer for is 2004-02-11; earlier dates are rejected rather than silently emptied.",
            "default": ""
          },
          "endDate": {
            "title": "End date (YYYY-MM-DD)",
            "pattern": "^(|\\d{4}[-/]?\\d{2}[-/]?\\d{2})$",
            "type": "string",
            "description": "Last trading day to fetch, inclusive. One TWSE session is around 31,000 records, so a long range gets large quickly; 90 calendar days is the per-run ceiling. Non-trading days cost one request and are skipped.",
            "default": ""
          },
          "warrantTypes": {
            "title": "Warrant types",
            "type": "array",
            "description": "The exchange files each type as a separate report, so narrowing this genuinely saves requests. Calls are the overwhelming majority — 28,772 of the 31,116 TWSE warrants live on 2026-08-18, against 2,280 puts and 64 bull/bear certificates.",
            "items": {
              "type": "string",
              "enum": [
                "CALL",
                "PUT",
                "BULL",
                "BEAR",
                "EXTENDABLE_BULL",
                "EXTENDABLE_BEAR"
              ],
              "enumTitles": [
                "CALL — 認購權證",
                "PUT — 認售權證",
                "BULL — 牛證",
                "BEAR — 熊證",
                "EXTENDABLE_BULL — 可展延牛證",
                "EXTENDABLE_BEAR — 可展延熊證"
              ]
            },
            "default": []
          },
          "underlyingCodes": {
            "title": "Underlying codes filter",
            "type": "array",
            "description": "Keep only warrants over these underlyings, e.g. ['2330', '2317']. This is the filter most callers want: it turns a 31,000-row session into the option chain on one stock. Index-linked warrants use the exchange's index codes (IX0001 for 臺股指數).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "warrantCodes": {
            "title": "Warrant codes filter",
            "type": "array",
            "description": "Optional list of warrant codes to keep, e.g. ['03812T']. Codes are not always numeric, so they are matched as text.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "issuers": {
            "title": "Issuers filter",
            "type": "array",
            "description": "Keep only warrants from these issuing brokers, given as the abbreviation the exchange puts in the warrant's name: 元大, 凱基, 群益, 統一, 永豐, 國票, 富邦, 台新, 國泰, 中信, 元富, 兆豐, 第一, 康和. Those fourteen are the whole market.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyTraded": {
            "title": "Only warrants that traded",
            "type": "boolean",
            "description": "Drop warrants with zero volume for the session. Roughly half the board does not trade on a given day — 14,593 of 31,116 on 2026-08-18 — so this halves the output while losing nothing a price series needs.",
            "default": false
          },
          "includeTerms": {
            "title": "Include issue terms and analytics",
            "type": "boolean",
            "description": "Join each warrant to its exercise price, exercise ratio, expiry and cap/floor, and compute moneyness, intrinsic value, premium and leverage from them. This is most of what makes the dataset useful, but the TWSE terms document is ~40 MB, so turning it off makes a quotes-only run substantially faster.",
            "default": true
          },
          "crossCheck": {
            "title": "Cross-check against independent feeds",
            "type": "boolean",
            "description": "Verify the parsed session against feeds the exchange compiles separately — t187ap42_L for turnover, STOCK_DAY_ALL for underlying closes, and the TPEX mirror endpoint. Results go to the log. The checks only run for the session those snapshot feeds were built on, so they are automatically skipped for historical days.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}