Bitstamp interview question

Implement an order matching function