Golos is a simple website to show a combined order book for the Bittrex and Poloniex ETH/BTC exchanges. It is written in a way which can be easily extended to include more exchanges as well as more order pairs. You can aggregate the order book to a given level of decimal precision.
There is a notable lack of a front-end framework used. This was a design decision made based on the limited interactive nature of the site. If we were to add realtime updates, and other interactive features, I'd consider using something like React.
The live app is hosted at: https://afternoon-reef-46531.herokuapp.com/
The code is written in a noteably functional style. The OrderBook.js file is worth particular mention in this regard. The OrderBook and CombinedOrderBook are essentially just named tuples. The main logic of aggregating and combining order books is implemented in a purely functional way, no side effects or mutations. This allows for easy reasoning about the code as well as great unit testability.
The aggregate and combine functions are implemented in O(n) and O(n+m) time complexity respectively, taking advantage of the fact the orderbooks come sorted. This has no practical benefit for the small data we have here, but would be important if we had to scale to large amounts of data, or if we were doing these calculations with high throughput requirements. I'm just putting this here as a fun/academic note.
Unit testing is done with Jasmine. It covers the aggregate and combine functions, the most logically cruxy parts of the app.
To run tests:
$ npm test
npm install
npm start
There are many notable shortcomings and features which need to be improved before this app would be production ready. In the interest of time-capping the work on this project, they have been left as tasks to do later.