kite.quote API response

sshiremath2000
i am getting response for timestamp from kite.quote as below,
u'last_trade_time': datetime.datetime(1970, 1, 1, 5, 30),
the date and time stamp in the response is wrong.
what am i doing wrong?
  • sujith
    Can you let us know for which instrument you got the timestamp like this and is it tick timestamp or last traded timestamp?
  • naz
    @sujith

    I am using python websocket client and I am also facing the same issue. Attaching today's data and instrument tokens . This happens definitely in the morning from 9:00 onwards. And probably later as well. Is this issue resolved.

    timestamp instrument_token mode volume last_price average_price last_quantity buy_quantity sell_quantity change last_trade_time oi oi_day_low oi_day_high ohlc tradable depth
    01-01-1970 28165890 full 0 38.2 0 400 0 0 0 01-01-1970 20800 0 0 {'open': 31.55, 'high': 43.45, 'low': 30.0, 'close': 38.2} TRUE {'buy': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}], 'sell': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}]}
    01-01-1970 28252674 full 0 32.8 0 1500 0 0 0 01-01-1970 162000 0 0 {'open': 33.0, 'high': 33.0, 'low': 32.25, 'close': 32.8} TRUE {'buy': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}], 'sell': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}]}
    01-01-1970 28292098 full 0 1.6 0 2800 0 0 0 01-01-1970 98000 0 0 {'open': 1.65, 'high': 1.7, 'low': 1.45, 'close': 1.6} TRUE {'buy': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}], 'sell': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}]}
    01-01-1970 26789122 full 0 0.55 0 2400 0 0 0 01-01-1970 602400 0 0 {'open': 0.35, 'high': 2.9, 'low': 0.35, 'close': 0.55} TRUE {'buy': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}], 'sell': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}]}
    01-01-1970 26870274 full 0 1.9 0 8000 0 0 0 01-01-1970 440000 0 0 {'open': 2.05, 'high': 2.05, 'low': 1.8, 'close': 1.9} TRUE {'buy': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}], 'sell': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}]}
    01-01-1970 27384066 full 0 8.35 0 5500 0 0 0 01-01-1970 313500 0 0 {'open': 7.5, 'high': 8.55, 'low': 7.45, 'close': 8.35} TRUE {'buy': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}], 'sell': [{'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}, {'quantity': 0, 'price': 0.0, 'orders': 0}]}

  • sujith
    We are getting timestamp as zero from the exchange during the pre-market session. We have asked the pykiteconnect team to change the response parsing to send back none in the response.
    It will be taken live in the next release.
  • naz
    Thanks @sujith
    Please see if it makes sense to change the response parsing to send back the timestamp as:
    1) Current Day + 8:59:59 OR
    2) Last Day + 3:40:00 OR
    3) datetime.datetime.now()
    Reason being, these tick data represent useful values at the closing of the last day - such as last_price , buy_quantity, sell_quanity.
Sign In or Register to comment.