kite.quote is not giving current data

>>> kite.quote('NFO:RELCAPITAL18APR320PE')
{'NFO:RELCAPITAL18APR320PE': {'instrument_token': 27246850, 'timestamp': datetime.datetime(2017, 12, 28, 15, 29, 56), 'last_price': 45.55, 'last_quantity': 6000, 'last_trade_time': datetime.datetime(2017, 12, 28, 15, 7, 21), 'average_price': 44.74, 'volume': 42000, 'buy_quantity': 66000, 'sell_quantity': 12000, 'ohlc': {'open': 44.4, 'high': 45.55, 'low': 44.4, 'close': 41.5}, 'net_change': 0, 'oi': 42000, 'oi_day_high': 72000, 'oi_day_low': 42000, 'depth': {'buy': [{'price': 44.15, 'quantity': 60000, 'orders': 1}, {'price': 44.1, 'quantity': 6000, 'orders': 1}, {'price': 0, 'quantity': 0, 'orders': 0}, {'price': 0, 'quantity': 0, 'orders': 0}, {'price': 0, 'quantity': 0, 'orders': 0}], 'sell': [{'price': 45.6, 'quantity': 6000, 'orders': 1}, {'price': 55.25, 'quantity': 6000, 'orders': 1}, {'price': 0, 'quantity': 0, 'orders': 0}, {'price': 0, 'quantity': 0, 'orders': 0}, {'price': 0, 'quantity': 0, 'orders': 0}]}}}

This is the data from kite.quote('NFO:RELCAPITAL18APR320PE').

The time stamp on output is 28-12-2017. For trading I need today's market depth at the present instant. I cannot place an order with these values.
  • sujith
    Kite Ticker caches the previous data so that it can be served immediately when a user subscribes to it. The last tick received from the exchange for this instrument is on 28 DEC 2017.
  • pvgeorge
    How will I get today's market depth?
    Even if no trades market depth changes. But here it is showing market depth on last traded date, not current.
  • sujith
    It is not being traded today, hence you are looking at old data. You need to check the date at your end before doing anything.
  • pvgeorge
    'depth': {'buy': [{'price': 44.15, 'quantity': 60000, 'orders': 1}, {'price': 44.1, 'quantity': 6000, 'orders': 1}, {'price': 0, 'quantity': 0, 'orders': 0}, {'price': 0, 'quantity': 0, 'orders': 0}, {'price': 0, 'quantity': 0, 'orders': 0}], 'sell': [{'price': 45.6, 'quantity': 6000, 'orders': 1}, {'price': 55.25, 'quantity': 6000, 'orders': 1}, {'price': 0, 'quantity': 0, 'orders': 0}, {'price': 0, 'quantity': 0, 'orders': 0}, {'price': 0, 'quantity': 0, 'orders': 0}]}}}

    I am speaking about this depth, irrespective of the last traded date, if it is available for trade today, ie at present, this value shown at NSE is the current data. From here I take the Best Buy Price and Best Sell Price, to place orders
  • sujith
    AFAIK it was not traded that day. But it is possible that NSE website might show some data and Kite will not have that. It is not possible for any trading platform to capture all the ticks over the internet there can be hundreds of ticks in a second at exchange but exchange publishes few ticks. You can check out more details here.
  • pvgeorge
    @sujith the timestamp of ltp quote is 3 months before and the market apparently depth is also 3 months old. Your reply shows you are not getting my point. 'timestamp': datetime.datetime(2017, 12, 28, 15, 29, 56). When NSE is showing today's market depth kiteconnect is showing 3 month old market depth. That is not a difference of seconds or minutes.
    It is a difference of 3months between Kiteconnect data and NSE data.
  • sujith
    Let me explain how Kite Ticker works,
    Kite Ticker listens to ticks coming from the exchange. Once it gets a tick, it will just publish the tick to all subscribed clients. We don't add, modify or delete any tick data. We just save and then publish the tick. Once a new tick arrives, it is again saved which will result in overriding previous data. If there is no tick then cached tick is served.
    I would suggest adding a check for tick timestamp at your end before consuming the tick data at your end.
  • pvgeorge
    Market quotes¶

    The market quotes APIs enable you to retrieve market data snapshots of various instruments. These are snapshots gathered from the exchanges at the time of the request.

    The above is from the docs. What the doc says and what is explained is do not match. What the doc says is what is expected.
  • sujith
    The Quote API fetches data from Kite Ticker. This is how it has been since the day we provided Quote API.
    We will update the documentation.
    The only solution here is to add a check at your end.
This discussion has been closed.