Wrong data in websocket.Buy and Sell Qty in websocket

RH1558
Hi
When i subscribe for a token. in this case glenmar nov fut. The buy quantity and sell quantity that i can see in the trading app are way different from what i get in the web socket.
To tv and example. today around 2.40 pm the buy sell qty was around 180000 and 220000.
But in the web socket it was giving data aroun 1925000 and 201000 .
Why is this huge wrong data being published.
The same is the case for other stocks like Jubiliant. then Acc and few others.

Please take cognizance of the same as we are paying for the API seperately.
Kindly let know when will this be corrcted.
  • sujith
    Can you let us know which client library you are using with the version number of that client library?
  • prakash.jj
    @sujith how can the client version affect the data that is sent across.... Have experienced many times the high low values doesn't match with the value from nse website. I don't understand why there is so much quality data in kite..May I know who is the data provider for kite?
  • RH1558
    Am using kite v3
  • Matti
    @prakash.jj Are you talking about websocket data or historical data?
  • sujith
    @RH1558,
    We couldn't observe the behavior on our latest version of client libraries.
    There are two things to be noted here, total buy and total sell are not cumulative values. Those are just the snapshot values. There is no relation between the total buy volume of first tick and second tick and are you sure, you are not blocking the thread while doing your operation. It is possible that your system didn't receive a particular tick and hence you observed the difference.
    Both the platforms are powered by the same backend so there shouldn't be any difference in values.
  • rohit3389
    i don't know which side is problem but following lines from your documentation
    https://kite.trade/docs/connect/v3/websocket/
    Quote packet structure
    16 - 20 int32 Volume traded for the day
    20 - 24 int32 Total buy quantity
    24 - 28 int32 Total sell quantity

    but if i use in java websocket

    Long totalBuyQuantity = Long.parseLong(new BigDecimal(buffer.getInt(20)).toString());
    Long totalSellQuantity = Long.parseLong(new BigDecimal(buffer.getInt(24)).toString());
    following is my console result for RELINFRA18NOVFUT
    totalBuyQuantity=8066500.0
    totalSellQuantity=373100.0
    date=Wed Oct 31 15:29:53 IST 2018]
    in this totalBuyQuantity is wrong, it show "Volume traded for the day" value

    if i change
    Long totalBuyQuantity = Long.parseLong(new BigDecimal(buffer.getInt(24)).toString());
    Long totalSellQuantity = Long.parseLong(new BigDecimal(buffer.getInt(28)).toString());
    following is my console result for RELINFRA18NOVFUT
    totalBuyQuantity=373100.0
    totalSellQuantity=291200.0
    date=Wed Oct 31 15:29:53 IST 2018
    it means Total buy quantity range is 24-28 and Total sell quantity 28-32

    for values verification i use your link
    https://api.kite.trade/quote?i=12183042&api_key=xyz&access_token=pqr

    is i am correct or wrong ?
  • sujith
    Hi @rohit3389,
    I am not sure how you are doing the test. But, we have verified the total buy and total sell quantity, it seems fine.
    The total buy quantity is the sum of all the buy pending order quantity at the exchange and there will be no correlation between the previous tick's buy quantity and next tick's buy quantity.

    People are using the current version of javakiteconnect in production from a very long time. I don't think there is an issue in the live market data.

    To make your test easier, I would suggest using Kite web for checking.
Sign In or Register to comment.