Wanted to confirm the behavior of the .NET client, and the way it subscribes to ticks for an instrument. I am interested in getting the LTP for an instrument and to achieve the same, have followed the example given here: https://github.com/zerodhatech/dotnetkiteconnect
Now, the OnTick() is called every second even though the LTP has not changed (Screenshot attached):
If you subscribe for tick in modeFULL then you will receive ticks for every change in the depth also. You need to set the mode to modeLTP for listening to only LTP changes.
@sujith please find below a snippet to reproduce the issue.
internal class Program { private static void Main(string[] args) { var user = new Kite(configuration["Kites:ApiKey"]).GenerateSession(configuration["Kites:RequestToken"], configuration["Kites:ApiSecret"]); var ticker = new Ticker(configuration["Kites:ApiKey"], user.AccessToken); ticker.EnableReconnect(Interval: 5, Retries: 50);
It seems we missed something while testing your code. We are able to reproduce this now. Our backend team is checking this behavior. We will get back to you with a confirmation.
Kite Ticker provides data in only three modes, modeLTP, modeQUOTE and modeFULL. It doesn't have a feature to fetch only partial fields. This feature something we have plans of providing in the future if it is feasible at our end. You can subscribe to any mode and ignore the fields that are not needed as of now.
var testToken = new uint[]
{
13406210
};
_ticker.Subscribe(Tokens: testToken);
_ticker.SetMode(Tokens: testToken, Mode: Constants.MODE_LTP);
Any update on this issue? I checked today and its still happening. Can you please get a quick resolution to this issue?
I require FULL mode data except market depth and require only when ltp changes. How do I do that? I am using python.
It doesn't have a feature to fetch only partial fields. This feature something we have plans of providing in the future if it is feasible at our end.
You can subscribe to any mode and ignore the fields that are not needed as of now.