@Amol , I looked up the documentation for BitConverter.ToInt16 and 32, and the second parameter is described as 'startIndex'. Your code snippet seems to be passing the endIndex. That means, your code should be in the following manner, right?
int i =…
@Amol are you getting any messages at all (you should get a 1-byte / second heart beat). If you are not, it's likely that your connection itself was not established properly.
1) Yes sure. When you do a "mode" request, you pass the tokens of instruments you want to apply the mode to.
3) Packets may have the same values as the last packet.
Can you explain the exact behaviour?
Pre market:
1) You connect
2) You send a subscription request / set-mode
3) You get the last cached quote
4) You keep getting 1-byte heart beats every second.
What after that?
@Sumit , when you place an order, it'll only fail if a) you sent a wrong parameter b) there's some issue in the backend. For all other cases (insufficient margin etc.), you'll still get an order id after succcessful placement. What happens to the or…
Hi @yogeshkakde ,
When the exchange is not ticking, you should get the last tick. When there's nothing to stream, there's a 1 byte heartbeat that is streamed every second (which you should ignore).
Are you computing the SHA-256 checksum using your api_key, request_token, and secret? The error happens when the checksum is wrong or you're passing an invalid parameter while trying to get the access_token.
Please try using the official Python or …
Hi @pracas
The historical/candles API is a separate addon. Once you've subscribed to it, historical data API will start working with your Connect credentials.
1) We have minute, hour, day candles for all instruments. For FNO, this data goes back o…
Hi @pracas
The historical/candles API is a separate addon. Once you've subscribed to it, historical data API will start working with your Connect credentials.
1) We have minute, hour, day candles for all instruments. For FNO, this data goes back o…
The error is Authentication failed: Missing request_token
And the parameter you are sending ["request_token"]=> NULL
Clearly, the error is because you are not sending the request_token that you'd receive after the login flow.
If you use the Kite Connect Python or PHP client libraries, the instruments() call returns an array of objects which you can just encode to JSON. Otherwise, you'll have to parse the CSV and encode it to JSON yourself in whatever language you're usin…
@suraj This should only happen if the product code is incorrect (NFO only has NRML and MIS), or if the segment is not enabled. Unfortunately, these order requests are not logged by the OMS.
When were these orders placed?
Hi @amanrawat , multi-user login is possible if you are building a platform (but it'll need exchange approvals). Please e-mail [email protected] regarding getting empanelled as a startup.
Depending on the internal state of the session, you may get the same access_token or a different one. Your application should not rely on them being same.
Also, why do you need to authenticate so many times?
@menaveenn I'm not sure, but I have a feeling the multi-processing routine could be using Kite Connect instances that have been initialised without the right access_token. Could you try a different approach without the mp module?
Hi @yogeshkakde ,
There are no geo-restrictions in place? There's an early morning session-flush that happens where all tokens are forcibly expired. Maybe you tried to login at that instant?
Is the error recurring?
1) The historical() method returns data for one instrument at a time, but calling them sequentially for various instruments should not be an issue.
2) 'Invalid credentials' should not arise unless the session has expired.
Is it possible to share th…
Examples are right here in the README -- https://github.com/rainmattertech/phpkiteconnect
Detailed documentation -- https://kite.trade/docs/phpkiteconnect/class-KiteConnect.html
@traderx If you're referring to NIFTY 50, the token doesn't change. For F&O, it does. I understand your concern and we're working on procuring this data and making it available as fast as possible.
Hi @traderx -- The issue is that exchanges change the instrument tokens every expiry. So token 260105 only refers to a certain period. If you have the previous tokens (this is obtainable from contract files), you should be able to fetch the data.
I…
Hi @gkannan1965
Looks like you haven't subscribed to the historical data APIs. Historical data doesn't come bundled with the Kite Connect APIs. You can subscribe to it by going to your app's page on the developer console.
@gkannan1965 We're looking into this. Just to confirm, you are using the latest version of the Python client library? We'd made some updates last week.
There is, but it'll take some time. You should give Kite a proper shot then. Apart from certain things like expert advisors and back testing, it covers everything required for trading, and a significant majority of all our orders come from Kite.
Hi @prasadrisbud , I am afraid that's a very broad question and falls outside the scope of our APIs. Depending on what you're building, it could be a Javascript web app, a mobile app, or anything.
@prasadrisbud You have to supply a trading symbol to the button. If you don't want to, you can build your own UI where the user picks a stock, which you then use to render a trade button.
@instruritesh , thanks for the clarification.
Any change to existing keys, removal or modification, would be a breaking change. We'll never do this. Break changes will always be introduced as a new API version altogether. So, zero chances
Yes it supports. "HDFC MAY FUT" is not a valid tradingsymbol. It's "HDFC16MAYFUT".
You can pass the "product" parameter along with the button. The parameters are documented here -- https://kite.trade/docs/connect/v1/#offsite-order-execution
Hi, we had network outages yesterday that affected all our systems including the APIs. Otherwise, this shouldn't really happen. If this repeats, could you make a note of the timestamps and let us know?
@instruritesh @Shabeershah2002 Apologies. We'll make announcements before changes like this happen. However, this was not a breaking change. A variable being removed from the response would've been.
That said, @instruritesh , I am surprised that yo…
Kite API has also been updated. Bracket orders and cover orders now work.
Check out the "bracket order" section here https://kite.trade/docs/connect/v1/#placing-orders
instrument_token is a numerical ID issued by us. This is used for fetching historical data with the historical API and for subscribing to live data on the WebSockets API.
Hi @vishal4kumar,
Not yet, but we'll be releasing it very soon. In the meanwhile, a Kite Connect user has released a Java library https://github.com/instruritesh/ZStreamingQuote
@Shabeershah2002 Every time you get a 403 TokenException, you should initiate a re-login. That's the only way to refresh tokens.
That said, a logout invalidates the access_token. They're also flushed at around 8.30 in the mornings.
@vishal4kumar Vishal, it's not ideal to poll the quote API, especially every 2 seconds. Please use the WebSocket for streaming data.
Are you requesting the access_token multiple times? It should be done only once (and once an access_token is genera…
@sekharrockz The quote API is for passive data retrieval, for instance, showing the quote for a stock on a buy window, where you just need to make one request (and not poll continuously). Since it's an HTTP call, it's also extremely easy to use.
T…
Hi @sekharrockz,
This is not possible at the moment. Session timeouts and manual 2FA logins are an exchange requirement. We are looking at ways to address this, but can't say anything with certainty as of now.