1) Wrong credentials (api key, secret, access token)
2) Expired access token (logged in elsewhere)
When you get a TokenException, you should re-initiate the login.
1) You need a redirect URL to get the request_token when you first login. If you are using a standalone Java app, you can probably open a WebView/Component, set the redirect_url to http://127.0.0.1 and capture it.
2) No manual action is involved un…
@pranksterguru A sandbox is on the cards but it'll take some time (technical limitations) unfortunately.
You can test most of the API with 0 balance still though (just that orders won't get executed).
You will have to code this at your end. Wait for the webhook for X seconds and then do a status check on the order. If it hasn't triggered, you'll have to cancel the order and re-send another.
This is almost ready. We have a "Postback" API that'll send you an HTTP post signal with some payload when an order's state changes (completed, cancelled, rejected). I'll make an announcement soon.
@garpitg You are correct. WebSockets API is already live and we have the NodeJS, Python, and Java client libraries in the making. They should be out very soon.
- With Kite Connect, you have freedom to trade however you want.
- Pi Bridge is a different product altogether, a plugin built onto the Pi UI. All its interactions happen on the Pi UI.
1) The system flushes all tokens in the morning at around 8.30 AM. It's best to refresh the token every day. We're working on making long-standing tokens available, but it'll take some time.
2) Rate limiting should only kick in if a particular clie…
@rajani.wahile @maravinthkumar We've invested significantly in development and infrastructure to bring you India's first-and-only personal trading APIs okay'd by the exchanges! We hope you understand. The costs may reduce in the future if we have en…
1) Please update your Python Kite Connect client. We've released a new version.
2) uy5ez5kyfqfg5mxj is a Publisher key. You cannot use KiteConnect APIs with it. It's meant for embedding trade buttons on webpages.
Hi, it's per month. Historical and Live are separate (optional) addons that you need to purchase.
We're working on the pricing page and other content and will be making a public announcement soon.
Sorry for the confusion.
@instruritesh The API streams messages tick(s) every 700ms to 1 sec. Each message can contain ticks for multiple instruments.
It would be trade based. The exchange may send n number of ticks per instrument per second (usually 5-10 for very active i…
You get public_token along with access_token. Please read the documentation.
We'll be releasing a WebSocket library soon.
Yes. You get the subscription token from the instruments CSV API.
@dineshkumarc The underlying data is indeed binary, just that it's being displayed by your system as hex. If you are using Javascript, please look up "arraybuffer". You may want to set ws.binaryType = "arraybuffer"
We'll be releasing a Javascript c…
@dineshkumarc That is the quote;it's binary data. Please read the documentation on how to parse it -- https://kite.trade/docs/connect/v1/#streaming-websocket-api
1) Yes, order can be placed, modified, cancelled
2) Yes. https://kite.trade/docs/connect/v1/
3) Rs 20 flat per executed order is Zerodha's brokerage. This is one of the cheapest rates in the Indian broking industry.
This is incorrect, Suraj. https://kite.trade/connect/login?api_key=XXXXX is the URL of the HTML page where the user should be redirected to login first (like a Facebook login). You only get the request_token after a successful login.
Can you please send an e-mail to [email protected] with the following details:
1. api_key
2. secret
3. The request token you get after a login session
4. The Zerodha user id you're logging in with
Response from the API is in JSON but once you use the pykiteconnect (which you are), the results are Python data structures (list, dict etc.). You don't need to use the JSON library,
This will happen if
a) Your request_token is wrong
b) Your api_key is wrong
c) Your api_secret is wrong
Are you sure you passed the correct request_token? Please debug and confirm.
As the error suggests, cross origin requests are blocked. You cannot make these requests from a webpage (browser) as that'll mean you expose the access_token. You have to access the API using a server side program.
I copy-pasted the curl command you mentioned above as it is, and it works. There is no 404 Route exception.
:~ $ curl https://api.kite.trade/session/token -d "api_key=vljy89p4oft21dnx" -d "request_token=pb9ntrhmmi3fnv4eusp6ib7c3ne1f387" -d "checksum…
1) Your jQuery code is incorrect. You're binding the events to an "#example-form", but there is no such form on the page.
2) http://freetradingtips.in/zb/2016/02/28/kite_html5/ -- the button seems to work fine. Can you do a Ctrl+Shift+R (hard refre…
I think the issue is with your curl REQUEST. It may be skipping the parameters bit and sending a GET request instead of POST. Suffix each line with a \ as shown in the documentation please.
Once you get the request_token, you will exchange it for an access_token. The access_token is what is used for every subsequent request.
If any request, at any point gets a "TokenException" (HTTP code 403), it means the session has been terminated.…
The user can always add funds by Going to https://kite.zerodha.com/funds
Kite acts as the central console for the user to manage his funds, account etc.
@ajay.b You're pulling the static instrument dump (CSV). There's another API call under instrument that provides quotes and other updates. Please refer to the documentation.
After the login flow, Kite will redirect to your app's registered `redirect_url` with `?request_token=xxx in the URL`.
Assuming your redirect_url is a PHP script, you can just use $_GET['request_token'] to get it from the query parameters in the UR…
@instruritesh The session is on the user's browser (i.e, the state of being logged in), not on the server.
- User A logs in on his computer once, he doesn't see the login screen until he logs out
- User B logs in on his computer once, same thing.
Got it. WordPress doesn't recognize $ (jQuery) by default.
Change the document.ready bit to look like this and it should work.
jQuery(document).ready(function($) {
@scorp we'll be releasing an open source PHP library for Kite Connect shortly.
In the meanwhile, if you paste your PHP code here, we may be able to debug.
Tutorial is here - https://kite.trade/docs/connect/v1/#publisher-js-plugin
You just need to copy-paste HTML + Javascript on any website, Wordpress or not.
Publisher does not use the redirect_url, so you can put in anything you want.
Given these input values, can you check if you're getting the given checksum?
ApiKey = xxxx
token = yyyy
ApiSecretKey = zzzz
checksum = 20ffb2c3e9532153b96b956845381adc06095f8342fa2db1aafba6b0e9594d68
I am not familiar C#, but I did some quick res…
@Ram , please e-mail [email protected] for regulatory advise.
Publisher plugin can be used anywhere without special approvals as the trades happen on our pre-approved UI,
Realtime order updates should be available in a week or so. This will happen behind scenes, and outside of the session you've initialise. The postback will contain the necessary details for identifying the user.
I am afraid I don't have an ETA yet …
@dineshkumarc We're working on documenting and making our WebSocket APIs public. It'll give you live streaming quotes for n number of instruments. This should hopefully be public in a week or two.
In the meanwhile, please do not poll the quotes API…