SDKs
Official clients for Python, TypeScript, Rust and Go.
| Language | Package | Install | Requires |
|---|---|---|---|
| Python | thaler on PyPI | pip install thaler | Python 3.10 or later |
| TypeScript | @thaler-sh/api on npm | npm install @thaler-sh/api | Node 20 or later, Bun, Deno, or an edge runtime |
| Rust | thaler on crates.io | cargo add thaler | Rust 1.85 or later, with tokio |
| Go | github.com/thaler-sh/thaler-go on pkg.go.dev | go get github.com/thaler-sh/thaler-go | Go 1.23 or later |
A client reads its key from THALER_API_KEY, or takes one when it is made. Keys are secrets: use a client on a server, not in a browser or an app you ship.
A first request
import thaler client = thaler.Thaler() # reads THALER_API_KEY rows = client.metrics("AAPL", period="annual", keys=["revenue"], limit=1)row = rows.data[0]print(row.value, row.read_from and row.read_from.accession_number)# 416161000000 0000320193-25-000079Every answer carries the request ID, the ETag and the account’s limits beside its data. Each package’s README lists every call, the Screener’s filters, point-in-time reads and its errors.
Limits and retries
A client keeps at most four requests in flight. When the minute’s sixty are spent, it waits for the reset before the next request. A 429 is retried after its Retry-After; one longer than a minute, the month’s limit, is returned as an error. A 500, 502, 503 or 504, or a connection that failed, is retried twice after a growing pause. A 400, 401 or 404 is returned as it stands.
Types and errors
Figures are decimals with every digit as filed, days are dates, and each model has the field names the API uses. An answer that is not as documented is an error that names the field and the request ID.
An error the API answers with carries its code, detail and request_id, and its class says whether the request was refused, unauthenticated, not found, rate limited, or failed on Thaler’s side.
Every request carries a User-Agent that names the client and its version. Your keys page shows usage by client.
Versions
The clients are 0.x while the API is in beta. A change to the API that adds a field or an endpoint is a minor version of each client. The changelog announces anything that would break existing use at least 30 days ahead.
Any HTTP client works without an SDK: the overview shows a first request with curl, and the reference every endpoint.