this error message is thrown by kite connect library. i am not using any other client. "invalid token" is the exception message. I have added 50 milliseconds delay between each request. And this error is coming at request number 411
There will be a debug mode flag that you can set in the constructor of the Kite object. And it will print extra logs. Try enabling that to see the full error message.
Is this a GUI app? The logs you posted seem to be internal .net build logs. Is there something along the lines of "Console logs"? Library uses `Console.WriteLine` to write logs.
If it is an `InputException` that means the access token was set to empty. Do you have multiple KiteConnect objects? If yes you have to set same access token for all of them.
The historical data API is provided for backtesting purposes only. We suggest creating candles at your end for live market strategies. You may refer to this thread to know more about generating candle data.
may i know the delay time ? OR will it be possible from current minute to request for previous(-1) minute. (example at 11:30 am can i request for 11:29 am 1 minute ?) Or is there any real time data streaming api ?
You may get one or you may get 3000 which is the maximum number of tokens allowed for subscription. You can read more about Websocket API behavior on FAQs.
this json i am getting from INTERVAL_MINUTE tick "{\"Mode\":\"quote\",\"InstrumentToken\":1293825,\"Tradable\":true,\"LastPrice\":1136,\"LastQuantity\":15,\"AveragePrice\":1130.81,\"Volume\":79814,\"BuyQuantity\":13478,\"SellQuantity\":21650,\"Open\":1104.3,\"High\":1145.45,\"Low\":1100,\"Close\":1098.8,\"Change\":0,\"Bids\":null,\"Offers\":null,\"LastTradeTime\":null,\"OI\":0,\"OIDayHigh\":0,\"OIDayLow\":0,\"Timestamp\":null}"
looks it is giving full day volume and not of current minute. Right ?
If you are sending too many requests you might be getting rate limited. If you are getting status code 429 then it is for rate limits.
HResult=0x80131500
Message=invalid token
Source=KiteConnect
StackTrace:
at KiteConnect.Kite.Request(String Route, String Method, Object Params, Dictionary`2 QueryParams, Boolean json)
at KiteConnect.Kite.GetHistoricalData(String InstrumentToken, DateTime FromDate, DateTime ToDate, String Interval, Boolean Continuous, Boolean OI)
This exception was originally thrown at this call stack:
If it is an `InputException` that means the access token was set to empty. Do you have multiple KiteConnect objects? If yes you have to set same access token for all of them.
Exception thrown: 'KiteConnect.InputException' in KiteConnect.dll
Or is there any real time data streaming api ?
Historical API both, do we need any other subscription for wesocket ?
"{\"Mode\":\"quote\",\"InstrumentToken\":1293825,\"Tradable\":true,\"LastPrice\":1136,\"LastQuantity\":15,\"AveragePrice\":1130.81,\"Volume\":79814,\"BuyQuantity\":13478,\"SellQuantity\":21650,\"Open\":1104.3,\"High\":1145.45,\"Low\":1100,\"Close\":1098.8,\"Change\":0,\"Bids\":null,\"Offers\":null,\"LastTradeTime\":null,\"OI\":0,\"OIDayHigh\":0,\"OIDayLow\":0,\"Timestamp\":null}"
looks it is giving full day volume and not of current minute. Right ?
Please spend 10 minutes and read the documentation, all these are the covered there and few that are missed are present in the FAQs.
Websocket API gives day OHLC values. You need to generate candles at your end for live market strategies using Websocket API.