You just have to encode the URI and pass it in `redirect_params` query param.
For example, let's say you want to get back `user_id=xxx` after the successful login you can initiate login with - `https://kite.zerodha.com/connect/login?api_key=kited…
From last Friday (October 6th) we have discontinued query params based authentication which is sending api_key and access_token via query params instead of headers. Infact we never officially supported it and it was internally used by our systems wh…
Due to regulations we can't keep multiple sessions of web so if user login to Kite web during the day it will invalidate all other sessions including publisher one.
Kite Publisher JS relies on iframes, but recent browser standards limit cookies within iframes, causing issues. To bypass this, post baskets directly to the basket endpoint (details: https://kite.trade/docs/connect/v3/basket/). Render a temporary we…
The Kite Connect API is intended for personal use, and data distribution is prohibited. However, you can become an exchange-approved partner, like Streak or Sensibull, to distribute the data legally. I will DM you the details of concerned person to …
last_trade_time is available only on `quote` call, `quote/ltp` and `quote/ohlc` won't have that field - https://kite.trade/docs/connect/v3/market-quotes/
It's bit complicated. So here is the limits, which ever hits first is applied. All these are per IP based so if you have multiple users with multiple IPs then its applicable per IP.
1. If you send more than 50 requests in 10 seconds which results …
I am not sure how it works in Angular but In Vue and React atleast you can refresh the page with location history on so there must be some workaround in Angular.
> still I believe kite redirect API is not correct or we can say not compatible wit…
In Kite redirect flow we have to append some query params to the final redirect URL like `status` and `request_token`. So here the problem is that angular uses hash fragment to do the frontend routing but as per URL standard formats the hash fragmen…
This seems like issue with object referencing in your JS code. This is a very common JS pitfall, you should make sure to not use same object in rows rendered.
Anything after `#` is called hashparam and used only client side and usually for navigation by modern JS apps. So the right URL structure is `scheme:[//authority]path[?query][#fragment]` which is what we are doing here. You can read more about it he…
If you couldn't extend your app for some reason DM me your email id so that I can add Kite connect credits for reminder of your historical subscription date which you can use to subscribe later.
That's how the subscription model is currently so if you reactivate app then your historical subscription will still be valid upto whatever the time you have subscribed for.
Apikey can be made public and it doesn't guarantee that the sender is authorized. Kite connect API's are for personal use so we don't give long standing token, if you are a startup then can reach out for access here - [email protected]
@neji Like @rakeshr said from the response we can see that its mode `quote` currently but you need to set mode to `MODE_FULL` using `set_mode` method in ticker. Check the example in README here - https://github.com/zerodhatech/pykiteconnect#websocke…
`on_ticks` is a blocking method and it won't be called again unless you return the function. Ideally you should run your order placing login in separate thread and not block the main thread. The reason is you will miss or get stale ticks which could…
Running these Alogs on home network even with backup is highly unreliable so its always better to go with some cloud provider. You can get server on AWS or DO for as cheap as $5 and since they have DC on Mumbai and Bengaluru (respectively) the laten…
Will fix this in library. I have created a Github issue here - https://github.com/zerodhatech/pykiteconnect/issues/72
For now you can do something like
if ws and ws.is_connected:
pass
We suggest you to wait atleast 60 seconds. You can fetch orderbook every few seconds but wait atleast for a minute before considering as a bad request. Ideally the order get reflected in orderbook immediately but in some rare scenarios its possible …
Seems like instrument token (2903809) might have been assigned to some other instrument during that period by exchange and it might not be trading now. This is a known issue. exchange assigns defunct token to new instruments. Will let you know when …
@sovan_nit `threaded=True` runs the Ticker connection in separate thread instead of main thread, if you don't have `threaded=True` then it will be blocked in main thread when you do `kws.connect` call. Its not possible to have separate thread for e…
@xameeramir Seems like issue is because Axios post request by default sends data as JSON payload but Kite API requires it to be `application/x-www-form-urlencoded`. You can check `axios.post` documentation on how to send POST request as `application…
Can you elaborate the issue? After taking or exiting position if you are making positions api call its not updated? or is it about PNL and M2M calculation?
You can subscribe for historical data addon and get volume traded for instruments on daily basis which you can average it.
For more info about historical data check here - https://kite.trade/docs/connect/v3/historical/
Orders in basket have gone through to our OMS so redirect with status as success since orders getting rejected can be account related issues like margins shortfall etc. If order couldn't reach our OMS then it will redirect with failure status.
@xameeramir Since elements in your page is created by js it wont be available when `publisher.js` loads. So you need to do it programmatically like its explained here - https://kite.trade/docs/connect/v3/publisher/#generating-dynamic-buttons-with-j…
@xameeramir You need to move `publisher.js` script tag to bottom of the page right before `` tag so that when script loads it can find all `kite-button` components and render accordingly. If you are populating button dynamically then you can check t…
@zerotrader Client side network disconnection is very common especially for WebSocket connections, If you don't want to miss out ticks while it was reconnecting then you have to run multiple ticker instances preferably in different machine and store…
You can pass a query param called `redirect_params` which will be appended to redirect url once login is successfull. Lets say you want to get back field called `user_id` in redirect then encode `user_id=abcd` and send it using `redirect_params`. Fo…
on_error doesn't log this error with the debug flag on. I had tried everything already. It just mentions the error code:1006 with the reason "no reason".
I found the issue by setting breakpoint and my eyes fell on the datatype of tokens.
It would be…
@mapreduce If you have implemented `on_error` callback then you could have logged the error. Also when in doubt always enable `debug` flag while initializing websocket to get more useful info.
@krtrader @enliyo We can verify the issue with increased latency. Its seems like issue with AWS Mumbai outgoing network traffic and we are reporting this to AWS team. Will post further updates here.
Hi, we had minor hiccup with ticker api and it was fixed before 9.15AM. CDS market wouldn't have received ticks for 10 mins after market opening. Also this is not related to mock session we conducted on Saturday, we had a network failure from our t…
Hi, we had minor hiccup with ticker api and it was fixed before 9.15AM. CDS market wouldn't have received ticks for 10 mins after market opening. We had a network failure from our tick provider to our servers and we had to switch to backup.
The issue was resolved now, please check. We had a minor bug in new update to ticker system which was affecting all HTTP calls. We will make sure to avoid such issues in future for sure.
@sabyasm Yeah rate limits have been slightly tweaked recently. Instead of having per second based rate limit we switched to per minute for write calls (POST, PUT and DELETE). Get calls still have the same per second rate limits. We will increase the…
@sabyasm I have looked in to your requests and it seems like your are consistently sending more than 200 write requests per minute (mostly PUT request) hence you are getting rate limited.
@kashyapgodhani This could be because you are exhausting memory. Enable php log and you can find the actual error in your logs. You can check this stackoverflow thread - https://stackoverflow.com/questions/561066/fatal-error-allowed-memory-size-of-1…
Yeah It's reported to both AWS and Cloudflare and AWS admitted that there is some network issue with outgoing to Cloudflare with their network provider VSNL. Here is the response from AWS team
From my internal tooling I can confirm that there has be…
@krtrader @HowUTrade Is your server hosted on AWS? We noticed increased latency from AWS to Cloudflare around 12th Dec and reported it to AWS and Cloudflare team. They confirmed something wrong with AWS India network which connects to Cloudflare.
1. Getting disconnected could be reliability issue with your network and if you enabled auto connect then it will try to resubscribe after getting connected.
2. You can disable `autoReconnect` before disconnecting after 3.30. In next release we wil…
If you are running your own thread then you don't have to pass `threaded=True`. I would suggest you to do `kws.connect(threaded=True)` which will create a thread in background and run it. With auto reconnect ticker will always be connected.
@jvshk78trade @RajeshSivadasan Tested in CI with Python 3.7 and it seems to be working - https://travis-ci.org/zerodhatech/pykiteconnect/jobs/425580166
Are you using virtualenv? Seems like you have installed it for system Python but you are trying to use from other Python instances like a virtualenv. You can find this by running a command which python. It can also be permission issue, you might hav…
@bhumi For now we have disable CORS so you wont be able to use this directly. You may have to use a proxy server such as nginx which will proxy websocket connection to ws.kite.trade from your domain. You can read about proxying here - https://www.ng…
3000 instruments limit is per connection so please check if you are exceeding it. Also note that if you already have say 1000 instruments and subscribe for more than 2000 then the new subscription will be rejected and you still have only 1000 instru…
Please check the documentation here - https://kite.trade/docs/connect/v3/portfolio/#position-conversion
Also this method is implemented in all our client libraries.
@pranksterguru Usually WebSocket is not so reliable and to detect the disconnection at the earliest heart beat is used and mostly disconnections are from client side.
You can check these two links
- https://github.com/arkochhar/Technical-Indicators
- http://technicianapp.com/resources/supertrend-2-2/
You can check out curated list for more useful links.
For api calls the delay will be negligible wherever you host it in India because the API is behind Cloudflare and Cloudflare latency might overshadow the latency between regions. For WebSocket you can host it in AWS Mumbai since our infra is also in…
@eeesathiaeee Tested your script after removing your symbol get logic and it works fine and order shows up in orderbook once I place it. Please be more specific about the issue like were you able to place the order but doesn't shows up or it doesn't…
@abhishek01 I tried connecting to websocket with your api key and access token starts with `uasRC` and I was able to connect and fetch data. Please check if the api key and access token provided is right.
@girish400 @nickmanan I am able to subscribe and get ticks with full mode. Please check if your callback code is fine. I will setup Anaconda env and check there also.