Building an AI agent? Start with /llms.txt for the full site index.
Docs
A repeatable view of market state built from prices, volume, technical indicators and market breadth.
Developers and research teams tracking the Taiwan market daily, or building a screening or monitoring process.
Python 3.9+, requests, an X-API-Key, and a symbol such as 2330.
import requests
BASE_URL = "https://api.twmarketdata.com"
HEADERS = {
"X-API-Key": "your_api_key_here",
}
def get_dataset(path, params):
response = requests.get(
f"{BASE_URL}{path}",
headers=HEADERS,
params=params,
)
response.raise_for_status()
return response.json()prices = get_dataset(
"/v2/datasets/twse-daily-price",
{
"symbol": "2330",
"limit": 20,
},
)tpex_prices = get_dataset(
"/v2/datasets/tpex-daily-price",
{
"symbol": "5483",
"limit": 20,
},
)indices = get_dataset(
"/v2/datasets/index-data",
{
"limit": 10,
},
)indicators = get_dataset(
"/v2/datasets/technical-indicators",
{
"symbol": "2330",
"limit": 20,
},
)breadth = get_dataset(
"/v2/datasets/market-breadth",
{
"limit": 10,
},
)Market-state data updates on a snapshot and ingestion cadence, and should be read together with the trading calendar.
Where a workflow spans several datasets, check freshness and data_gaps on each — otherwise data that arrived at different times gets treated as one moment.
summary = {
"twse_prices": prices.get("rows", []),
"tpex_prices": tpex_prices.get("rows", []),
"indices": indices.get("rows", []),
"technical_indicators": indicators.get("rows", []),
"market_breadth": breadth.get("rows", []),
}
print(summary)With a market-state summary in place, the natural extensions are: