Skip to content

Query Builder

Build a working SDK snippet in seconds. Choose your data type, asset, parameters, and language — no docs diving required.

Code Recipe Builder

Pick a use case and get working code in seconds.

FLATFILES requests

The interactive builder above generates per-contract MDDS (request/response) snippets. Whole-universe FLATFILES requests use a different parameter set — (sec_type, req_type, date) instead of (symbol, start, end) — and ship as a separate surface in the SDK. Below is the same snippet shape for FLATFILES so you can construct calls in the same builder pattern.

Parameters

ParameterValuesRequired
sec_typeOPTION, STOCK, INDEXyes
req_typeEOD, QUOTE, OPEN_INTEREST, OHLC, TRADE, TRADE_QUOTEyes
dateYYYYMMDD stringyes
formatcsv, jsonloptional (defaults to csv for the on-disk path; the in-memory path returns typed rows)
output_pathfilesystem pathoptional (the on-disk paths only)

Snippet shapes

python
# Python — typed terminal:
rows = tdx.flat_files.option_quote(date="20260428")
rows.to_polars()        # or .to_pandas() / .to_arrow() / .to_list()

# Python — bytes on disk:
tdx.flatfile_to_path("OPTION", "QUOTE", "20260428", "out.csv", "csv")
ts
// TypeScript:
const rows = await tdx.flatFiles.optionQuote('20260428');
rows.toArrowIpc();
bash
# CLI:
tdx flatfile quotes 20260428 --format csv -o spy_quotes.csv

# REST:
curl 'http://127.0.0.1:25503/v3/flatfile/option/quote?date=20260428&format=csv'

See the dedicated Flat Files section for the full method signatures, format specifications, and bandwidth caveats.

Released under the Apache-2.0 License.