-
Market Order:
Matches best available price -
Limit Order:
Buy Limit Order: An Order at a price n or lower
Sell Limit Order: An order at a price n or higher
orderType: Enum (Market | Limit) price: double quantity: double
Maintains:
- A list of bids
- A list of asks
- A list of transactions
- last traded price
- market spread value
- ability to notify when the order is matched
Orderbook should be able to accept new Orders Orderbook should be able to update existing Orders Orderbook should be able to delete existing Orders ! Will we require a unique identifier (ID) for finding orders? Received order should be added to the orderbook maintained in the memory
Asks Map { price: {quantity}, price: {quantity}, price: {quantity}, price: {quantity}, } Bids Map { price: {quantity}, price: {quantity}, price: {quantity}, price: {quantity}, }