program halt because of builtins.KeyError: 'last_trade_time'

okhatavkar007
Are there chances that sometimes tick data will not have the 'last_trade_time' ? some keys would get missed, if that anyone how we can handle this. I can write the try catch to manage this. Apart from the `last_trade_time` is their a possibility that other data also get missed?
  • sujith
    Is this on Quote API call or websockets API?
  • okhatavkar007
    It was from websocket
  • okhatavkar007
    This is intermittently happened, I would say keyerror usually come only in case if the data in not in present in the tick
  • rakeshr
    Can you let us know the instrument token for which you are missing last_trade_time field intermittently? Also, let us know the ticker mode you are subscribing to.
  • sujith
    It could happen when the mode is not full. While reconnecting at first subscription mode is quote and then set mode is called for full mode.
  • sujith
    Only full mode has last traded time
  • okhatavkar007
    Yes, I subscribed as MODE_FULL, token was `13548546`
Sign In or Register to comment.