{
  "openapi": "3.0.1",
  "info": {
    "title": "Taiwan Convertible Bonds — 可轉債行情與轉換條件 API",
    "description": "Daily bars for every convertible and exchangeable bond on the Taipei Exchange, joined to the terms that make them tradeable: conversion price and window, put date and price, coupon, outstanding balance. Matched and negotiated sessions kept apart; every average price recomputed and checked.",
    "version": "0.1",
    "x-build-id": "yJWfdkOBIynS9gLB5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/chamarix~taiwan-convertible-bonds/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-chamarix-taiwan-convertible-bonds",
        "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-convertible-bonds/runs": {
      "post": {
        "operationId": "runs-sync-chamarix-taiwan-convertible-bonds",
        "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-convertible-bonds/run-sync": {
      "post": {
        "operationId": "run-sync-chamarix-taiwan-convertible-bonds",
        "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": {
          "recordTypes": {
            "title": "What to fetch",
            "type": "array",
            "description": "Four feeds, written to one dataset and told apart by record_type. 'bonds' and 'put_options' are one request each and return the whole board; 'quotes' is one request per bond per calendar month, so it is the one that costs anything.",
            "items": {
              "type": "string",
              "enum": [
                "quotes",
                "bonds",
                "put_options",
                "delistings"
              ],
              "enumTitles": [
                "quotes — daily bars per bond",
                "bonds — issuance terms & conversion price",
                "put_options — the forward put window",
                "delistings — bonds that left the board"
              ]
            },
            "default": [
              "quotes",
              "bonds",
              "put_options",
              "delistings"
            ]
          },
          "startDate": {
            "title": "Start date (YYYY-MM-DD)",
            "pattern": "^(|\\d{4}[-/]\\d{2}[-/]\\d{2})$",
            "type": "string",
            "description": "First session to include in the quotes. Defaults to the first of the end date's month. The exchange serves a whole calendar month per request and the output is trimmed to the range you ask for, so a one-week window costs the same as the month around it.",
            "default": ""
          },
          "endDate": {
            "title": "End date (YYYY-MM-DD)",
            "pattern": "^(|\\d{4}[-/]\\d{2}[-/]\\d{2})$",
            "type": "string",
            "description": "Last session to include, inclusive. Defaults to today in Taipei. Only affects 'quotes' — the other three feeds are current-state snapshots with no date parameter of their own.",
            "default": ""
          },
          "bondCodes": {
            "title": "Bond codes",
            "type": "array",
            "description": "Keep only these bonds, e.g. 11011, 15602, 811211. A bond code is its issuer's code followed by the tranche number, so it is usually five characters but runs to six from the tenth issue on (至上11 is 811211). Leave empty for the whole board, about 390 bonds.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "issuerCodes": {
            "title": "Issuer stock codes",
            "type": "array",
            "description": "Keep only bonds issued against these underlying stocks, e.g. 1101, 2330. Handy when you know the equity but not the bond — an issuer can have several convertibles outstanding at once.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeNegotiated": {
            "title": "Include negotiated sessions",
            "type": "boolean",
            "description": "The board runs two price discoveries a day, matched (等價) and negotiated (議價), and the exchange prints them as separate rows that can close at different prices on the same date. Negotiated prints are rare but large — often most of the day's turnover when they happen. Turn this off for a single continuous matched series.",
            "default": true
          },
          "includePrivatePlacements": {
            "title": "Include private placements",
            "type": "boolean",
            "description": "The issuance master also carries privately placed convertibles, which have no public market and often no bond code at all — the exchange fills that column with 無 or N/A. They are excluded by default because they can never appear in the quotes. Only affects 'bonds'.",
            "default": false
          },
          "maxRequests": {
            "title": "Maximum quote requests",
            "minimum": 0,
            "type": "integer",
            "description": "A safety cap on the quote fetch, so an accidental multi-year range does not become a surprise bill. A month of the whole board is about 390 requests. When the plan exceeds the cap the first bonds by code are kept. Set 0 to lift it.",
            "default": 450
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}