Server Responses
The Kibot API answers every request with HTTP status 200 OK, errors included; only an infrastructure failure (a maintenance window, a network problem) produces a real HTTP 5xx or a connection error. Success or failure is in the response body: an error body starts with a three-digit code and a short message, for example 405 Data Not Found. The codes reuse the 400 range to communicate Kibot-specific conditions like "wrong symbol", "data not available for that period", and "rate limit exceeded". This article lists every code, explains why 403 Login Failed is also sent for rate-limit trips, and covers the gzip/deflate compression negotiation that you should always use for tick and intraday responses.
Response codes
Successful requests
| Code | Meaning |
|---|---|
200 OK |
The request succeeded. Body carries the payload (CSV bars, TAB-separated adjustments, or a status banner). |
The API sends HTTP status 200 for every response it produces, so the status does not tell success from failure. Read the start of the body instead: a body that starts with one of the codes below (for example 404 Symbol Not Found or 405 Data Not Found.) is either an error or a Kibot-specific signal, and anything else is the payload.
Error codes in the response body
| Body starts with | What it means | What to do |
|---|---|---|
400 Bad Request. followed by a reason, for example Invalid Interval. or Missing symbol. |
The request is malformed or a parameter is missing or invalid. | Read the reason after the code and correct the URL. |
401 Not Logged In, or the longer 401 Not Logged In. Your account does not have access to the data. Accounts without subscription expire after 45 days. |
No valid session, or the username and password sent on a data URL were not accepted. A wrong password on a data call gives this code, not 403. | Log in again and retry. If the credentials are right and it persists, check that the subscription is active. |
402 Unauthorized. '<user>' account is not authorized for <symbol>. |
Logged in, but the symbol is not in any package the account owns. | Compare the symbol with the package list returned by login. |
403 Login Failed |
On action=login: the username or password is wrong. On any call: too many requests at once from your address (more than 40 in flight or 50 new requests per 500 ms). |
If it came from login, fix the credentials. Otherwise slow down, keep to five or fewer connections and retry with a short backoff (see Data updates). |
403 Connection limit exceeded. |
The account has too many simultaneous connections, counted across all your API connections, or the account is being used from too many different addresses. | Close idle connections or lower the number of parallel workers, then retry. |
404 Symbol Not Found |
No such symbol for this instrument type. | Check the spelling and the &type= parameter (for example &type=futures for a futures ticker). |
405 Data Not Found. followed by No data found for the specified period for <symbol>. |
The symbol exists but there is no data in the requested period. On adjustments it means no splits or dividends since your cursor date, and an unknown symbol gives the same answer (the text there is shorter: No data found for <symbol>.). |
Widen or move the date range. For adjustments treat it as "nothing changed". |
407 Already logged in for <n> minutes as '<user>' |
You called login again while a session from the same address is still active (20-minute idle timeout). It is not a failure, and it is sent before the password is checked, so a wrong password in that situation also gives 407. |
Skip the second login and keep using the session. |
429 Data budget exceeded. or 429 Too many concurrent downloads. Please retry shortly. |
The first form: a daily, weekly or monthly usage limit on the account has been reached. The second: too many large downloads are running at the same moment. | For the first, wait for the window named in the message to reset. For the second, wait a few seconds, retry, and run fewer large downloads in parallel. |
497 Not Allowed. followed by Your account does not have full access to the API. (a rarer variant starts with 499 Not Allowed. and says full access to API) |
The account has no full API access, for example a daily-data plan or an expired access period. | Use the guest login for tests, or see the plans. |
500 Internal Server Error. |
An unexpected failure on the server. | Retry after a pause; see the next section. |
The most consequential reuse to be aware of is 403 Login Failed. It is returned for a wrong password on login and for a request-rate trip. After a successful login, do not treat a 403 as an auth problem: it is almost always the throttle. Detail in API authentication.
The most consequential non-error response is 405 Data Not Found from ?action=adjustments. It is the "nothing has happened to this symbol since your cursor date" signal that drives the incremental-update pattern. Treat it as a normal control-flow branch, not an exception.
Server errors
An unexpected server-side failure returns the body 500 Internal Server Error. Unexpected Error. On a 500 body, a real HTTP 5xx from the infrastructure, or a connection error, back off and retry; these typically coincide with maintenance windows, which the status command is meant to detect.
Compression
The Kibot API supports gzip and deflate response compression through standard HTTP Accept-Encoding negotiation: the server compresses historical data only when your request asks for it. gzip is the recommended algorithm.
Client side
Send the standard request header. Many HTTP libraries send it automatically, so check that yours does:
Accept-Encoding: gzip,deflate
Most clients then decompress transparently. In .NET's HttpWebRequest, set AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip and the framework decompresses for you (see the official sample in API client examples). Python's requests decompresses automatically. Rust's reqwest requires gzip(true) on the client builder. Go's net/http decompresses transparently when the request omits Accept-Encoding and the server responds with gzip; if the request explicitly sends Accept-Encoding: gzip, the caller is responsible for decompression.
Why it matters
For tick and intraday responses, gzip typically compresses the body by 5–10×. A 100 MB raw tick file lands as 10–20 MB on the wire, which on a typical broadband link is the difference between a 5-minute and a 30-second download. Daily and weekly responses are small, so the savings per call are negligible.
The server only compresses when the client opts in via the header. A request without Accept-Encoding gets the raw uncompressed body, which is correct HTTP behavior but leaves bandwidth on the table.
Server side
A compressed response includes a Content-Encoding: gzip header. If you bypass your library's automatic decompression and read raw bytes off the socket, check this header and run the body through your language's gzip module before parsing.
Practical patterns
Differentiate 403 Login Failed causes
A wrong password gives 403 only on action=login; on a data call it gives 401. So a 403 from login is bad credentials, and a 403 on a data call, especially mid-stream after dozens of successful requests, is almost certainly the rate limiter. The remedies differ (fix your credentials, or back off and retry), so guessing wrong wastes time.
Treat 405 from adjustments as "no changes"
Wrap the adjustments call so that a body starting with 405 returns "no changes" rather than raising. On history a 405 means the window holds no data; on adjustments it means "no rows in your window", which is the normal answer for a symbol that has had no split or dividend since your cursor date. The same response is also returned for a symbol that does not exist.
Always send Accept-Encoding
Send Accept-Encoding on every request, even small ones: advertising gzip support costs nothing. Many HTTP libraries send it automatically; verify yours does, and set the header explicitly if not.
Distinguish 405 Data Not Found from 404 Symbol Not Found
Both can appear when a request goes wrong, but they mean different things:
404: the symbol itself is not in Kibot's catalog (or is being fetched with the wrong&type=).405: the symbol exists but Kibot has no data for the requested date range (onadjustments, an unknown symbol also returns405).
A retry strategy that lumps them together will retry symbol typos forever; treating them separately surfaces the actionable error to the caller.
Key Takeaways
- Every API response has HTTP status
200, errors included (infrastructure failures aside); the code at the start of the body (401,404,405and so on) is what callers should act on. 403 Login Failedmeans a wrong password onloginor a rate-limit trip on any call; a wrong password on a data call gives401. Tell the two403causes apart by which call returned it and by request rate, not by retrying.405 Data Not Foundfrom?action=adjustmentsis the signal for "no changes since your cursor" and should be handled as a control-flow branch, not an error.404 Symbol Not Foundand405 Data Not Foundboth mean the request could not be fulfilled, but they differ (no such symbol vs. no data in this window) and need different retry logic.Accept-Encoding: gzip,deflateis always worth setting: tick and intraday responses compress 5–10×.- The server responds with
Content-Encoding: gzipwhen it compresses; most HTTP libraries decompress automatically, but not every configuration does.
Related
- API authentication: the login flow and why
403also appears for rate limits. - Rate limits and throttling: how to tell an auth failure from a rate-limit trip, and the recommended backoff pattern.
- Adjustments request: where
405becomes a normal "nothing changed" signal. - History request: where compression matters most, because tick responses are large.
- Data updates: the per-server ceilings that produce
403when exceeded. - API client examples: reference implementations showing
Accept-Encodingand decompression in five languages.