¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

fine-grained timestamps for reconstruction of market events around a trade execution?


 

I (programmatically, via TWS) place a limit order for a stock at an exchange that I designate. I then update the limit price of the order as often as a few times per second while I wait for the trade to execute. Meanwhile I am also subscribed to level 2 and market data for the stock, and to the various callbacks related to the order. I would like to log data so that, after the trade executes, I can reconstruct as precisely as possible the timeline of events over a several-second period around the execution. Relevant events include:

  1. a price change that I submitted for my own order takes effect on the exchange
  2. a publicly reported trade of the stock on any exchange
  3. a change in the order book (in, say, the first 20 levels of level 2 data aggregated across all exchanges)

My own order may be hidden, in which case it will not appear in the order book.

I would like to use TWS to obtain a precise timestamp for each such event, for the time when the event occurs at the exchange.

To what extent is that possible? How should I go about finding out? Is there accurate documentation of available timestamps?

Thanks,

-Neal

Join [email protected] to automatically receive all group messages.