Errors
Errors are JSON problem details (RFC 9457) with the content type application/problem+json. code says what went wrong, detail says what to do, and type links to the code’s entry on this page.
{ "code": "missing_key", "detail": "Send your API key in the Authorization header: Authorization: Bearer thaler_…. Create a key at https://thaler.sh/developers/keys", "request_id": "req_4242a7fab93842e5a45d", "status": 401, "title": "API key required", "type": "https://thaler.sh/developers/errors#missing_key"}Every response has a request ID: in request_id here, in meta.request_id otherwise, and in the X-Request-Id header. An X-Request-Id you send (up to 64 letters, digits, -, _ and .) is used instead.
Codes
bad_request
400. A parameter is missing, unknown or out of range, such as limit=0 or a Screener column that doesn’t exist. detail names it. The request counts.
missing_key
401. The request has no Authorization: Bearer header. Send your key as Authorization: Bearer thaler_….
invalid_key
401. The key isn’t a Thaler API key. Keys are 45 characters: thaler_ followed by 38 letters and digits, the last 6 of which are a checksum, so a key with a typo or a missing character is refused.
revoked_key
401. The key was revoked, by you or because it was found in public on GitHub. Create a new key at API keys.
expired_key
401. The key has passed the expiry date set when it was made. Create a new key.
not_found
404. There is no such endpoint, company, filing, holder or day. On the routes under /v1/securities/{ticker}, a 404 means Thaler doesn’t cover a company with that ticker; search with /v1/securities?query=. The request counts.
method_not_allowed
405. The API only answers GET.
rate_limited
429. A limit was reached. The problem’s type is https://iana.org/assignments/http-problem-types#quota-exceeded, and violated-policies names the limits: minute, month or concurrent. Wait for Retry-After. The request doesn’t count. See Limits.
internal_error
500. Thaler failed to answer. The request doesn’t count. If it happens again, write to support@thaler.sh with the request ID.
unavailable
503. Thaler is busy or not ready. Try again shortly. The request doesn’t count.
timeout
504. The request took too long. Try again, or ask for fewer rows. The request doesn’t count.
Retrying
Retry a 429 after Retry-After, and a 500, 503 or 504 after a wait that grows with each attempt. A 400, 401 or 404 fails the same way again.