Getting Incorrect Price change value with Full mode in Websocket

Harsh1993
Harsh1993 edited December 2023 in .Net API client
Hi,
We are using .net Nuget v4.0.30319
While using Websocket with Full mode we are getting incorrect values of Price change for some Index.


  • Harsh1993
    the issue is specifically where the index is in negative.

    check Change Value

    {"Mode":"full","InstrumentToken":256265,"Tradable":false,"LastPrice":20917.05,"LastQuantity":0,"AveragePrice":0.0,"Volume":0,"BuyQuantity":0,"SellQuantity":0,"Open":20932.4,"High":20941.25,"Low":20850.8,"Close":20937.7,"Change":42949652.31,"Bids":null,"Offers":null,"LastTradeTime":null,"OI":0,"OIDayHigh":0,"OIDayLow":0,"Timestamp":"2023-12-07T11:20:26"}

  • Harsh1993
    @rakeshr @sujith
    Please help at earliest
  • sujith
    Can you mention the library version you are using?
  • sujith
    Can you use the newer version v4.2.1 from Nuget? We have published a new update with the fix.
  • Harsh1993
    Severity Code Description Project File Line Suppression State
    Error Could not install package 'Tech.Zerodha.KiteConnect 4.2.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
  • Harsh1993
    @sujith We are updating nuget package but its not getting installed on .netframework 4.7.2
  • sujith
    sujith edited December 2023
    You may have to update the .NET project version.
  • tonystark
    @Harsh1993 Your project seems to be targeting a really old version of .Net that is no longer supported by Microsoft. We recommend you to update it to latest to be on the safer side.

    KiteConnect .net library you are using is also extremely old. v4.1.1 onward library targets .NET 6. We recommend updating the library as soon as they are available.

    If you cannot upgrade your project quickly then as a temporary fix you will have to calculate the change value by yourself by doing tick.Change = tick.LastPrice - tick.Close;
Sign In or Register to comment.