Streaming Historical Data

I would like to see a websocket service which would stream historical data (bars, orders, trades) from any point of time in history …

Basically just like what you have now in real time … but let applications tell you a point in time to start from.

2 Likes

This would make testing much easier!

It can be done by requesting historical trades/quotes/bars and streaming these values via WebSocket emulating Alpaca Data API v2. You just request the data, buffer it and stream with appropriate delays. It should be very similar to the Alpaca streaming proxy approach but only with the historical data.

The question is only timestamps - if you’ll keep the original timestamps you should never get the current time and use ‘emulated’ time from the stream. Or you can replace timestamps in historical data with the actual time before sending them into the WebSocket.

Yeps. But if this were a feature of the platform, not everyone who wants to back test streams (or test streams outside of market hours) would need to roll their own socket emulation. :slight_smile: