ticks.get(0).getTickTimestamp() is returning null

narasimha
want to get tick time stamp but getTickTimestamp() is returning null with mode.Full
  • sujith
    You need to check if the ticks list size is more than zero then only you should perform the action.
    Kite Ticker sends a heartbeat signal every second to make sure connection is intact, which will have 0-byte ticks.
  • narasimha
    ticks list size is more than zero, i am getting lasttrading price value when tried for timestamp of the tick it is returning null. Are there any changes we need to make to enable tick time stamp. Please let me know
  • sujith
    You can check what is the mode before trying to print timestamp. Kite Ticker subscribes to quote mode by default. You need to set full mode explicitly after subscribing for a tick.
  • narasimha
    Mode is set to full tickerProvider.setMode(tokens, KiteTicker.modeFull) after subscription, even then getting null for time stamp
  • sujith
    sujith edited July 2018
    Did you try printing the mode of received tick?
  • narasimha
    Yes, Now I am getting the time stamp. not sure why it is not printing earlier with out any change to the code.
  • narasimha
    Thanks, please close this thread :)
This discussion has been closed.