Cookie settings
We use essential cookies to keep you signed in and secure, and analytics cookies to improve the product. We never use them for ad tracking.Learn more
Answer
You can get TWSE data programmatically in three ways: call the official TWSE OpenAPI and parse the JSON yourself, use a data provider's REST API, or let an AI agent fetch it over an MCP server. With TW Market Data you sign up for a free API key and make a single HTTP request with an X-API-Key header, and the response is clean JSON.
Request the TWSE daily price dataset and read the JSON rows:
import requests
headers = {"X-API-Key": "your_api_key_here"}
url = "https://api.twmarketdata.com/v2/datasets/twse-daily-price?symbol=2330&limit=10"
print(requests.get(url, headers=headers).json())Check the freshness and data_gaps signals in the response and on the dataset page rather than assuming full history. TW Market Data is TWSE-first; TPEx historical depth is disclosed per dataset.
The free plan includes the basic datasets with a monthly request quota so you can validate your integration end-to-end before upgrading. A Python SDK (pip install) is planned but not yet published.
Related