Milliseconds in tick data from IQFeed

Issue #23 resolved
Павел Тарасов created an issue

Hi.

I would like to know, is there any way to get timestamp with milliseconds from IQFeed?

For example I load data as:

library( QuantTools )

date_from = '2020-08-03 04:31:00'
date_to = '2020-08-03 04:40:00'

settings = list(
  iqfeed_host = '127.0.0.1',
  iqfeed_port = '9100'
)
QuantTools_settings( settings )

get_iqfeed_data(symbol='BD#', from=date_from, to=date_to, period='tick')

And I get data:

# time
1 2020-08-03 04:31:02
2 2020-08-03 04:31:02
3 2020-08-03 04:31:02
4 2020-08-03 04:31:03
5 2020-08-03 04:31:03

There are rows with the same time. Usually we can distinguish them by milliseconds, so I would like to get milliseconds. Is there a way to do it?

Comments (2)

  1. Павел Тарасов reporter

    I'm sorry, my fault, I didn't google enough. It isn't QuantTools problem, data already with milliseconds, I just need to set

    options(digits.secs=3)
    

    and I get data as I wanted it:

    # time
    1 2020-08-03 04:31:02.427
    2 2020-08-03 04:31:02.793
    3 2020-08-03 04:31:02.954
    4 2020-08-03 04:31:03.553
    5 2020-08-03 04:31:03.739

  2. Log in to comment