5-minutes delay on realtime trades/quotes ticks

I signed up for Market Data yesterday.
Just in case, I regenerated my auth keys, so that the subscription data is linked to the new keys.
I confirmed today that the account page says that I have “Unlimited” Stocks subscription.
The ticks (trades and quotes) are coming into my C# test app which used sample code from Alpaca Github page at Alpaca Streaming API · alpacahq/alpaca-trade-api-csharp Wiki · GitHub

All ticks have a timestamp which is 5 minutes earlier than the current time.
In other words, the “realtime” ticks are being sent to me with a 5 minutes delay.

What should I do to get realtime ticks from Alpaca Market Data API so that the latency is measured in milliseconds, not minutes?

@dmg There shouldn’t be more than perhaps a 150ms delay in streamed trades and quotes. Alpaca ingests data directly from the SIPs with about a 20ms latency. Alpaca then immediately streams that data. Network latency can then add 150ms or more.

One thing you may want to ensure is that your local clock is synchronized to the NIST Internet Time Service. That is what all financial institutions are synched to. There’s some info how to do that here.

1 Like

Thank you for your reply.

You are absolutely right.
I had my Windows dev machine sync’ed via the default time.windows.com server, which as it turns out was setting my machine’s clock to 5 minutes forward.
As soon as I changed the time synchronization service to use time.nist.gov, I saw the clock immediately change to the correct time which looked like it jumped back 5 minutes.

I still have questions about the latencies, but it’s a totally different story, and I will ask them separately.
Thank you.

Best regards,