Tick Structure

SAURABH
Hi!
I am a bit confused about the tick structure of websocket api. In the tick structure, the buy list is always empty, while the sell list has 10 elements, with first 5 elements having increasing price quotes and the last 5 having the decreasing price quotes. Does this mean that the first five elements of the sell list gives the buy price and volume, while the last five give the sell price and volume?
  • Kailash
    @SAURABH Are you referring to the Python WebSocket client? If yes, please make sure you have the latest version (3.1.1).
  • SAURABH
    I am referring to the format in which the tick data is received from the websocket client from kite Connect. The data is in the following format: [{
    "mode": "quote",
    "tradeable": True,
    "instrument_token": 738561,

    "last_price": 957,
    "last_quantity": 100,
    "sell_quantity": 2286,
    "buy_quantity": 0,
    "volume": 5333469,
    "change": 0,
    "average_price": 959,
    "ohlc": {
    "high": 973,
    "close": 957,
    "open": 969,
    "low": 956
    },
    "depth": {
    "sell": [{
    "price": 0,
    "orders": 0,
    "quantity": 0
    }, {
    "price": 0,
    "orders": 0,
    "quantity": 0
    }, {
    "price": 0,
    "orders": 0,
    "quantity": 0
    }, {
    "price": 0,
    "orders": 0,
    "quantity": 0
    }, {
    "price": 0,
    "orders": 0,
    "quantity": 0
    }, {
    "price": 957,
    "orders": 196608,
    "quantity": 2286
    }, {
    "price": 0,
    "orders": 0,
    "quantity": 0
    }, {
    "price": 0,
    "orders": 0,
    "quantity": 0
    }, {
    "price": 0,
    "orders": 0,
    "quantity": 0
    }, {
    "price": 0,
    "orders": 0,
    "quantity": 0
    }],
    "buy": []
    }
    }]
    """

    I want to clarify what values are the buy price and what values are the sell price.
  • SAURABH
    And also why there is an empty list corresponding to buy, while sell has 10 elements in the corresponding list. Also on top, the buy quantity is 0, while sell quantity has a non-zero value.
  • SAURABH
    Please answer the query as soon as possible, since I need it urgently
  • Vivek
    @SAURABH I guess you are using outdated version of pykiteconnect. Please install the latest version and the market depth issue has been fixed.
Sign In or Register to comment.