Always fun to read about HFT. If anyone wants to learn about the Order Book data structure you can find it in JS here:
https://github.com/rhodey/limit-order-book
https://www.npmjs.com/package/limit-order-book