Tardis Machine Server v3 - unified APIs for real-time and historical crypto market data
Tardis-machine is an open source, locally runnable server with built-in data caching which provides both tick-level historical and consolidated real-time cryptocurrency market data via it’s HTTP and WebSocket APIs and is available via npm and Docker.
Notable Changes
The only breaking change in v3 is different port for WebSocket APIs (now 8001 by default).
We’ve mainly focused on improving WebSocket endpoints performance that used to be much slower than it’s HTTP counterparts. In v3 we’ve switched to uWebSockets.js server which is one of the fastest WebSocket servers currently available and used by many of top cryptocurrency exchanges in production.
In our preliminary benchmarks on AMD Ryzen 7 3700X, 64GB RAM, WebSocket /ws-replay API was able to send ~500 000 messages/s on average for already locally cached data, which is ~5x improvement.
Other than that, we’ve revamped documentation and introduced cluster-mode config flag which when enabled launches tardis-machine as cluster of Node.js processes to handle the incoming requests.
Use Cases
Time-machine market data replay
Exchanges' WebSocket APIs are designed to publish real-time market data feeds, not historical ones. Tardis-machine WebSocket /ws-replay API fills that gap and allows "replaying" historical market data from any given past point in time with the same data format and 'subscribe' logic as real-time exchanges' APIs. In many cases existing exchanges' WebSocket clients can be used to connect to this endpoint just by changing URL, and receive historical market data in exchange-native format for date ranges specified in URL query string params.
Streaming real-time spreads across exchanges
WebSocket /ws-stream-normalized API provides consolidated real-time market data streaming functionality. It doesn't requires API key as connects directly to exchanges real-time WebSocket APIs and transparently restarts closed, broken or stale connections (open connections without data being send for specified amount of time).
Market data collection stats from March 12, 2020
500GB of market data received from exchanges real-time feeds
2,500,000,000 individual messages collected
30,000 messages/s on average
Last, but not least… positive customer feedback
Overall I like your service (well documented, is flexible regarding accessing data and gives detailed order book I could not find anywhere else).
BTW: just wanted to say well done to you. Tardis is a tremendous step up in terms of price as well as quality compared to everything else we've (briefly) checked out, including <….>, etc.
One of the annoying things with <….> is historic data through dumps instead of API as well as lack of granular books. We've seen samples of a book snap (without deltas) only once each minute. Ouch. It wasn't immediately apparent that quality of Tardis is so much better.
The WS replay thru a client works really well!
(really well = I only needed to change the URL endpoint. subscribe and parsing worked flawlessly)