I am using Lightstreamer to stream tick data: https://labs.ig.com/streaming-api-reference
There is an issue when receiving ticks through midnight as you can see from this data extract below.
UPDATE_TIME
Publish time of last price update (UK local time, i.e. GMT or BST)
BID
Bid price
OFFER
Offer price
23:59:40
7317.9
7321.9
23:59:41
7317.7
7321.7
23:59:42
7317.4
7321.4
23:59:48
7317.1
7321.1
23:59:52
7317.4
7321.4
23:59:59
7317.2
7321.2
23:59:59
7317.1
7321.1
23:59:59
7317.2
7321.2
00:00:00
7317.1
7321.1
00:00:00
7316.7
7320.7
00:00:01
7317.2
7321.2
00:00:01
7317.1
7321.1
00:00:01
7317.2
7321.2
00:00:01
7317.1
7321.1
For each tick, I am recording the date of each tick from my local clock, so I can know the exact date time of the tick.
The data marked in amber is being labelled by my program as belonging to the same date as the data in black, when it should be labelling it belonging to the next day. From this, it seems that like my local clock is a couple of seconds behind the ig clock.
For example tick data received with UPDATE_TIME = 00:00 is for the next day, but is being recorded as the same day by my program using current date from local clock.
I was therefore looking on labs.ig.com for a way of obtaining the date of the tick message, so I could record the ig date of the tick against its time. But that approach would have a problem if the date changes after fetching the date and before collecting the tick.
Presume the opposite is also true, someone's local computer clock might be ahead of ig. Therefore with the extract above, incorrectly labelling the tick received at UPDATE_TIME = 23:59:40 with the date of the next day.
This could be completely resolved of course if the tick data had date as well as time.
Is there a workaround?
Many thanks