开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

record and replay ib_async session (data only)?


 

?
How hard would it be to modify ib_async to record a session for playing back later? ?The motivation is that it would give a general mechanism for recording data for later use, such as backtesting. ?
?
Specifically, I would like to have a client that runs ib_async (suitably modified) for a day, subscribing to various data feeds such as ticks and level2 data (but not making any trades or other active requests that modify account state). ?I would like the modified ib_async to record all incoming messages from TWS in a file, so that later I could play the session back. ?That is, run a different client, with ib_async simulating the incoming TWS messages recorded in the file, instead of actually connecting to TWS.
?
How hard would it be to modify ib_async to allow this? ?It seems like it _might_ be relatively easy, mainly by modifying the connection class.
?
More generally, one could imagine recording a session that also included activities such as trading, and being able to replay those verbatim, with some kind of inspector that allowed one to zoom in and inspect critical moments in a session.
?
Or perhaps someone has already tried this?
?
-Neal

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