Before issuing any requests, client applications must perform a user authentication dialog with our servers. The login process authenticates the user account and provides the level of service and feature access associated with the account. A successful login returns the 200 OK message followed by a list of authorizations for the account. Error messages are returned for failed logon attempts.
http://api.kibot.com?action=login&user=[username]&password=[password]
After successful login, the server returns 200 OK followed by the list of authorizations. If any of the required parameters is missing or incorrect, the following generic error message is displayed: "401 Unauthorized. Login Failed".
Here is an example of a successful login operation:
200 OK
Authorizations
=====================
All Stocks,1/1/1998,1
The table below describes all the parameters that are accepted:
PARAMETER
DESCRIPTION
REQUIRED
POSSIBLE VALUES
action
Specifies the server command to perform
YES
login
user
Specifies the user name or e-mail address
password
Specifies the password assigned to the account
NO
Password
May be omitted for guest account
Use the login information provided to you after your initial purchase. The server keeps track of the products you have purchased and allows you to download data for which you are authorized. The time out interval for user sessions is set to 20 minutes. You can keep your session alive and prevent frequent login operations by calling the Status command.
Number of concurrent requests from more than one IP address are tracked and restricted. Guest accounts are allowed to download only certain amount of daily (end of day) historical data.
It is possible to skip the login process entirely by appending &user=[username]&password=[password] to the end of every download request. The server will interpret your URL correctly and assign a request to your account.
In order to significantly speed up the download process write code to login once and login again only in case you receive "401 Not Logged In" error.
Once you login, the server waits for 20 minutes of inactivity before it logs you out. In practice, you only need to login once before you start downloading data and as long as you do not pause or stop the download process you will be able to access API without any problems.
Do not call login request before every data request. That is almost twice as slow since you are making two requests for every symbol to the API server instead of only once. So login once, construct the code to recognize the "401 Not Logged In" error and then repeat login process only if necessary.
URL:
http://api.kibot.com?action=login&user=guest&password=guest
Response:
© 2023 Oricsoft. All rights reserved. | Privacy Statement