Measure market-data latency and coverage
Pick one venue, product, channel and observation window. Record exchange event time when documented, local UTC receive time and a local monotonic receive timestamp. Calibrate the local clock and retain its measured uncertainty. A difference across two clocks includes the true delay and their offset.
Split the measurements
| Measurement | Formula or check |
|---|---|
| Apparent event delay | local UTC receive time minus exchange event time |
| Decoder or queue delay | handler monotonic timestamp minus socket-read monotonic timestamp |
| Coverage | expected versus observed IDs or verified sequence range when the protocol provides one |
| Availability | time with a valid connection and usable reconciled state divided by planned run time |
For example, an event time of 12:00:00.100 UTC and receipt at 12:00:00.145 suggests 45 ms. If the clock offset estimate is uncertain by 4 ms, record that uncertainty. Measure p50 and p95 along with sample count, rejected timestamps, gaps and reconnect durations. Otherwise skipped outages can make the delay distribution look better.
Repeat the run in the same location and time window when comparing two implementations. Keep REST round-trip latency separate from WebSocket event age. Both can help, but they answer different operational questions. Trade time versus receive time · REST and WebSocket comparison.