Building an AI agent? Start with /llms.txt for the full site index.
Docs
A simple research workflow, showing how several dataset queries combine into structured research context.
Every row of disclosure data carries a knowledge date, set conservatively to the statutory filing deadline — so a backtest filtered on it does not see numbers the market could not see at the time.
Every disclosure row carries a knowledge date. Monthly revenue, the comprehensive income statement, the balance sheet and the cash flow statement all carry knowledge_date, alongside kd_source explaining where that date came from and kd_imputed marking whether it was observed or derived. Align on that column rather than on the period end date, and a number enters your backtest when it entered the market, not when the quarter closed.
It is the statutory deadline, and it is deliberately late. Measured 2026-08-19: on every disclosure dataset checked, kd_source was statutory_deadline and kd_imputed was true. That date is the legal filing deadline, not the moment of actual announcement, which we do not yet capture. Companies file on or before the deadline, so the date runs late rather than early: a company that announced ahead of schedule looks slower than it was. That costs some fidelity, but it cannot leak future information, and that is the safer direction for the bias to run.
Daily prices do not have this column. twse_daily_price carries no knowledge_date field. For a closing price the trading day is the publication day, so the gap is small — but it is still a real gap, and an agent that assumes the column exists everywhere gets undefined rather than a date. The point-in-time properties of each dataset are listed on the coverage page.
as-of truncation over REST. Measured 2026-08-22: the REST dataset endpoints apply it. Passing as_of moves the latest row back to the cut-off — 2330 daily prices return 2026-08-21 with no parameter and 2020-06-30 with as_of=2020-06-30. The response reports as_of_applied, which field was actually filtered, and how many rows were cut, so you can confirm it worked rather than take our word for it. This is truncation on **knowledge time**, not on date: with as_of=2021-03-31 monthly revenue returns February, because February's revenue is not filed until March. On filing-based datasets that knowledge time is the **statutory filing deadline** rather than the actual announcement date, so data never appears earlier than it genuinely became public: conservative, safe for backtesting, and not precise. Daily prices have no filing deadline and are truncated on the trading day.
This example is not an AI model. It is a financial data retrieval workflow.
The point is to show how an agent uses TW Market Data as its data tool layer.
/agents/simple_research_agent.ts/agents/simple_research_agent.pyEvery step returns a requestId and credits metadata, which is what makes the run observable and a support question answerable.
TWMD_API_KEY=sk_live_xxx node examples/agents/simple_research_agent.tsTWMD_API_KEY=sk_live_xxx python3 examples/agents/simple_research_agent.py