mathpaquette / IQFeed.CSharpApiClient

IQFeed.CSharpApiClient is fastest and the most well-designed C# DTN IQFeed socket API connector available
MIT License
120 stars 43 forks source link

AskTime and BidTime give timespan that shows no date #161

Closed ghostrider closed 9 months ago

ghostrider commented 9 months ago

Hi there,

When subscribing to L1 data and including AskTime and BidTime, the resulting TimeSpan gives me something like this: 06:51:13.2240000 - which is hours, minutes, seconds and a bit more than micros.

I assume it's since the start of the day? But which day? What would happen in case of a delayed feed at 00:00 AM? The timespan for a delayed feed could show 23:50:00 if the feed is delayed by ten minutes. Hence I can't simply take the current date as a reference point in time.

How can I know the reference point for this timespan?

Thanks in advance!

P.s. great library!

NichUK commented 9 months ago

If you read the IQFeed docs on their site, I believe that it says that all timestamps are in Eastern Time from memory.

ghostrider commented 9 months ago

Hi Nich,

I realised that the DQN Api delivers the timestamp - there's no date coming from their either - it seems. Therefore I'll close this issue and continue in the DQN forums

For completeness, the solution is to overlay the incoming bid/ask time with the timestamp received through Level1ClientOnTimestamp

Thanks Ulrich