Errors
Branch on the type, then the code. Messages may change.
json
{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "limit must be between 1 and 100.",
"param": "limit",
"requestId": "9f1c2e4a-…",
"docUrl": "https://gloom.sh/datasets/docs/errors#parameter_invalid"
}
}paramnames the parameter or header at fault, or is null.- A route can add fields of its own. A
404from/v1/cds/curvescarriesreason:no_cds_entitywhen no reference entity has the name,no_level_in_windowwhen the entity has no level in the window, with the date of its last one inlastLevelDate(null when there is none). - Errors cost nothing. A 404 or 503 after the charge is refunded.
- A dataset call without a key answers
402 payment_required, priced to pay per call. Elsewhere, a401without a key carriesWWW-Authenticate: Bearer realm="Gloom Datasets"; a refused key addserror="invalid_token". - A 405 carries
Allow, the methods the path takes. Browsers can read it. - For support, quote
Request-Id. - Outages and planned maintenance of the REST API and the stream are on gloom.sh/status, with mail alerts and a JSON copy to poll.
Types
All routes9
| Status | Type | Retry-After |
|---|---|---|
| 400 | invalid_request | No |
| 401 | authentication | No |
| 402 | plan | No |
| 403 | permission | No |
| 404 | not_found | No |
| 405 | invalid_request | No |
| 409 | invalid_request | No |
| 429 | rate_limit | Yes |
| 503 | api_error | Yes |
What each code means24
parameter_unknown400- A parameter this route does not take.
paramnames it. parameter_missing400- A required parameter is missing.
paramnames it. parameter_invalid400- A parameter has the wrong type, format or range.
parameter_repeated400- A parameter that takes one value was sent more than once. A list (fields, include, symbols, a filter of names) may be sent repeated: its values are read as one comma list.
cursor_invalid400- The cursor does not belong to this route and query. Start again without it.
body_invalid400- The JSON body is missing, too large or does not match.
version_invalid400- The Gloom-Version header names no published version. Every route answers in the latest.
read_too_large400- One read needs more market data at once than a key's market data allowance holds in a minute, so no retry can serve it. Ask for fewer symbols in one call.
missing_key401- No key was sent. Use Authorization: Bearer gds_...
invalid_key401- The key is unknown or revoked, or the token sent does not start with gds_: quotes or brackets around it, a variable that was never filled in, or Bearer twice. Send Authorization: Bearer gds_...
wrong_key401- A Gloom Pro or News key was sent. Datasets keys start gds_. A Datasets key sent to a Gloom Pro route (/v1/quotes, /v1/data, /v1/history) gets this code too, with the Datasets route to use.
plan_required402- The account has no plan. Choose one to read data.
dataset_not_included402- The plan does not include this dataset or depth. The message says what the plan reads and names the plan that does. The same call with the same key gets it again until the plan changes: do not retry.
payment_required402- No key and no payment. Pay this call with x402 (the PAYMENT-REQUIRED header says how), or send a key.
payment_invalid402- The x402 payment was refused: another amount, network or recipient, a bad signature, too little USDC, or a payment already used for another call. Nothing was charged.
payment_failed402- The x402 payment was refused at settlement, before any transfer. Nothing was charged; sign a new payment and retry.
key_disabled403- The key or its account is disabled, or the email is unverified.
not_found404- No record has this id, a symbol sent alone names no listing Gloom knows or none the route covers (param: symbols, with a hint), or the path is not a Datasets route.
method_not_allowed405- The route does not take this method. The Allow header lists the ones it does.
idempotency_conflict409- This Idempotency-Key was sent with another request. Send a new key for a new request.
rate_limited429- The key, or the wallet paying per call, is over its per-minute credits, or a read is over the key's market data allowance or its first-read budget for the minute, each named in the message. Wait Retry-After. A read that goes on over several minutes, as a company's statements read the first time, says how far it got: each retry reads more.
credits_exhausted429- The period's credits are spent. They renew with the period.
payment_unconfirmed503- The x402 payment was sent for settlement but its outcome is not known: the transfer may still land. No data was sent. If it settles it is recorded under the request ID: write to hello@gloom.sh with it for a refund.