Question: develop a Python class named OrderBook, that can model and store an order book. note the following: OrderBook should be able to handle both the
develop a Python class named OrderBook, that can model and store
an order book. note the following:
OrderBook should be able to handle both the bid and ask sides.
OrderBook should be able to handle both market and limit orders. A market order
should be matched immediately, while the limit order may or may not be filled fully.
A partially filled or totally unfilled order becomes part of the order book.
Any any time, be able to output the best bid, best ask, bidask spread, and all market
depth.
Any any price, ensure time priority of orders by matching orders that were placed first.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
