All NIFTY indices are listed in the /instruments call. Eg:
`256265,1001,NIFTY 50,NIFTY 50,0.0,,0.0,0.0,0,EQ,NSE-INDICES,NSE` -- Nifty 50's instrument_token is 256265
SENSEX however is not available as of now (not on Kite either), although it will b…
3) For one scrip, you'll ideally get 1 tick per 1000ms (700 is rare). You can approximate to 1 tick / scrip / second.
4) Ah yes, you're right. I was off by an order of magnitude! The correct calculation would be 264 * 100 * (6.5 * 60 * 60) = 617.7…
@sayanriju The certificate's route CA is Geotrust. It should be in your Python installation's trust store.
We'll release a patch today with some SSL settings tweaked. Let's see if that'll help.
1) We do not limit this as of now, but we may introduce a connection limit in the future. The correct way to do this would be to open a central connection and use that for managing all subscriptions.
2) Right after you send one subscription request…
It's better if you do this at your end. We don't have an internal API to cancel multiple orders at once, so we'll have to send multiple requests ourselves, making error handling at your end tricky.
@soumyadeep Do you have another machine or VM to test this on? This most definitely sounds like an issue with the CA trust store on your system. We do not have any other reports.
https://www.sslshopper.com/ssl-checker.html#hostname=websocket.kite.tr…
@gautam_s60 Please read the WebSocket section. The data structure is described well here https://kite.trade/docs/connect/v1/#connecting-to-the-websocket
@sameer It's not possible to change frequency. You should set mode to 'full' and accept every tick and discard the rest.
I seriously doubt this will impact your bandwidth or system. Streaming quotes for 100 instruments should be 1/1000th the bandwi…
1) You request only *once* obviously! It's streaming pub-sub API, not request-response.
2) WebSocket internally may be buffered, but if you want to explicitly buffer and wait, you have to implement your own queuing mechanism.
@sameer Login and click on "Create app" and create a "Connect" app.
@Debsush logins are flushed at 8:15 AM every morning. An access_token, unless invalidated, should last until then.
@soumyadeep We tested this on different networks and systems and it works. This could be a network/firewall issue. Is it possible for you to maybe use WireShark to figure out what's happening over the wire?
Ah, you are referring to charts. I'll check why the open value has been approximated. With the Kite Connect, you get streaming data which is accurate.
Yes, that's what I was referring to as 'market depth'. It gives you 5x bids and offers (number, q…
@sudheer1990 this is JSON. You can use any JSON parsing library (every programming language has one), and loop through the ->data->candles[] array and print the values in whatever format you want.
1) We relay the data sent by the exchange as-is, so yes, it should be accurate. I just checked the open price for TATSTEEL on the Kite marketwatch (add the instrument, click on the market depth button), and it's 372.20.
But, do note that the freque…
@Debsush Yes, to login and use the API (place trade etc.), you need a Zerodha account. The API is meant for personal use, so once you get your Zerodha account, you should be able to authenticate and use the APIs. Even if you don't want to trade, you…
This can be programmed. You can use the streaming (WebSocket) API to subscribe to live quotes and trigger an order or an order modification based on whatever price condition you set.
You can get started by reading the documentation (https://kite.tr…
@soumyadeep I am afraid such explaining the fundamentals of web development will be out of scope.
That said, you needn't buy a domain. You can host a local web app and supply 127.0.0.1 as your redirect url. If you're using Selenium, you can provide…
Hm, I'm not sure what you mean, but all analysis, you should do at your end. You can retrieve ticks and put them in an in-memory array or something and then run your metrics.
https://kite.trade/docs/connect/v1/#packet-structure
All prices are in paise. For currencies, the int32 price values should be divided by 10000 to obtain four decimal plaes. For everything else, the price values should be divided by 100.
@ishwarm I'll see how we can pass weights. For commodities and currencies, we deal with lots as units (always 1). When you place orders, you have to send 1.
@dhavalp Did you have Kite open at the same instant?
The stream you receive via the library and the stream you see on Kite are the same thing (websocket.kite.trade). So if you have Kite open and it's fine, but the library is showing delayed values …
@Shabeershah2002 The messages you're receiving right after placing orders may be signals, which you can ignore. You should only process WebSocket messages of type 'binary'.
Ah yes, understood. We'll do something about this.
For the time being, you can pass the exchange name to the /instruments call to retrieve the list for just that exchange. eg: /instruments/NSE , /instruments/NFO etc.
@kumar_krishnan Kite *Publisher* is free. There is no subscription or expiry.
If you have a *Connect* app, like @Rh1558 said, just add credits to your account it'll be renewed automatically.
Are you fetching INFY - BFO data using the /instruments/ call? That may work as the data comes from the OMS.
However, BFO support on WebSockets and Historical APIs aren't functional yet.
@Jilani no ETA just yet, I'm afraid. Still hopeful about a release this month.
PS: Have you check this out? https://github.com/instruritesh/ZStreamingQuote
@kartik.trade What is the response code from websocket.kite.trade? It should `101 Switching protocols`. You will not get a response body.
Also, I just noticed that you're doing a JSON.parse() and sending the resultant objects to the API. That is in…
1) Yes, it's fine to place such orders (we're working towards building a proper sandbox, in the meantime)
2) Webhooks should work. Let me look into this. Can you PM me your api_key?
@sudhirshettyk Kite Web and Kite Connect belong to the same ecosystem, so many issues affect them both.
Pi is an entirely different kind of backend, so it should be immune to most issues that happen at the TR API level.
PS: Several major updates h…
@cosmik I'd like to correct @vivek by adding that we have both api_key and IP address based rate limiting.
Also /instruments is in a different limit zone. It should not affect standard API calls.
Finally, yes, we'll make access_token mandatory.
@sabyasm 8:15 is indeed a little arbitrary, but that's the window required for the series of processes (data updation) that happens in the OMS.
Once we have the long standing token, it should be valid for several days.
@Shabeershah2002 We noticed a few drops on new connections ourselves but they lasted only few seconds, definitely not 20 mins. Are you using the Python client?
@Shabeershah2002 Saturday's a mock trading day. This weekend, our OMS vendor conducted several (emergency) unscheduled maintenance activities owing to the downtime on Friday.
Are you still facing this issue?
@Sumit @sabyasm The extremely unfortunate outage not just affected the APIs but the entire ecosystem. This has got nothing to do with the "beta" status of the API.
We are as frustrated as you are and Nithin is personally dealing with Thomson Reuter…
@garpitg KiteConnect in turn uses another library websocket-client, which reconnects automatically. If that isn't working for some reason, the above should help.
@SAURABH Are you using the Python client? getaddrinfo failed implies the issue is with network resolution. You are connecting to 'websocket.kite.trade', yes?
When you request at 10:30 (for a few seconds, if your local time isn't on sync with the server time), the last candle could be 10:20. This could be off by a few seconds, but not more than that.
@Shabeershah2002 Bytes won't match because ticks are transient. If you're having to reverse the order, it should be C# handling it with a different "endianness". Ideally the stream should be big endian.
It's documented here under the "Getting started" section -- https://kite.trade/docs/pykiteconnect/#kiteconnect.WebSocket
You'll have to install the library first with pip install kiteconnect (provided you have Python, pip etc. setup)
No, WebSocket…
@Shabeershah2002 I'm not sure what's happening here. What you're doing seems to be correct. Not sure of the nuances of C#/.Net. Have you tried the Python client?