Wrong LTP

rishiajmera
rishiajmera edited April 2022 in .Net API client
Hello,

Today we observed one weird issue.

We got the wrong LTP for one symbol temporarily.
Symbol Name: NIFTY2241317550PE
Time: 10:58:22
LTP received: 437.5
Actual LTP was around 40-45rs.

Please note that there are multiple people using the same software for more than 6 months now. This issue is happening with one particular account only. Other accounts are not having this issue.

Let me know what other details you require.

Thanks,
Regards,
Rishi A.
Myalgomate Technologies LLP
https://myalgomate.com/
Tagged:
  • sujith
    @rishiajmera,
    Can you private message the client id?
  • rishiajmera
    sent please check
  • sujith
    All ticks come from same source, it is not possible that only one user has an issue.
  • sujith
    If there was one stray tick then it would have shown up on charts. since high would be 437.5 and even websocket would show high as this value for the day.
  • rishiajmera
    rishiajmera edited April 2022
    I understand it and it has never happened before for us too.
    But only one user got this issue. We have verified logs at our end and the LTP was captured 437.5 only.

    Can you advise how we can track this issue?
  • rishiajmera
    rishiajmera edited April 2022
    Hi Sujith,

    today it has happened again.

    Wrong tick for BANKNIFTY2242136800CE at around 10:29:08.





    One thing I have observed is, The LTP at that time was around 271-272 and the tick we received was 27175. So I think the problem is with the decimal conversion. We're using .net C# API. Can you please check the logic for the same?

    Can you please tell me how we can solve this issue?

    Request you to take this issue on a serious note.

    Regards,
    Rishi A.
  • rishiajmera
    One thing I have observed is, The LTP at that time was around 271-272 and the tick we received was 27175. So I think the problem is with the decimal conversion. We're using .net C# API. Can you please check the logic for the same?
  • rishiajmera
    Again, please note, that if the issue was in our programming then it should happen with all of our clients. But it's not the case.

    Rarely it's giving this issue.

    Hope this time I will get a satisfactory answer.
  • tonystark
    tonystark edited April 2022
    @rishiajmera This seems difficult to debug. We checked our parsing logic and couldn't find any place where this could go wrong. As per this line the divisor will always be minimum 100 and we use that everywhere for LTP, which should give us two decimal points or otherwise it must have failed with an exception at some other place.

    Could you give us more details to debug this? Like -

    - The version of the library you are using
    - Does this happen only on specific kind of instruments
    - Does it happen in specific time frame always

    Also it would be great if you could give us the debug logs from Ticker which you can enable by initializing Ticker class with "Debug: true". With the packet size data from the logs we could check if this is a client level issue or data level issue.
  • rishiajmera
    rishiajmera edited April 2022
    Hi, @tonystark Thanks for your reply. It's not happening with any particular instrument. It's happening with nifty or bank nifty options randomly. Also, it's not happening with a few users randomly. We have reported around 5-6 instances so far. Initially, we ignored it but when it happened more we thought there is definitely some problem. We will enable debug log and will share the data with you when it happens next time. We're currently using the 3.0.8 version. we will upgrade to 3.0.9 which is currently stable but please check if the issue was there in 3.0.8 or not so that we can confirm if the issue is resolved or not.

    Regards,
    Rishi A.
  • tonystark
    We had a change in 3.0.9 related to divisor logic to accommodate for BCD segment. It is highly unlikely that it was the reason. But always make sure you are on the latest version of the library.
  • rishiajmera
    We have upgraded the library.

    This problem has happened 5-6 times. I can share the logs of each and every instance with you if you want.

    But please don't ignore it there is definitely some issue.
  • tonystark
    Yes sure. I assume these are your application logs. Make sure to redact confidential data from them.

    Try to collect the Ticker debug logs because that is the most useful one.
  • rishiajmera
    Sure, will do. Thanks
  • rishiajmera
    @tonystark We've again faced the same issue.
    Ticker debug log doesn't record the data into log. Can you pl suggest how we can do it?
  • tonystark
    You can do it like this: https://github.com/zerodha/dotnetkiteconnect/blob/master/KiteConnectSample/Program.cs#L476

    Possible to send the log that is available right now?
Sign In or Register to comment.