Markets use an orderbook to facilitate price discovery. This article will demystify exactly what is the orderbook and how does it work. Given that the main purpose of a market is price discovery, an orderbook is quite simply a list of willing buyers and sellers and the price(s) at which they are willing to conduct a trade. Before we discuss further, it is important to understand two basic order types in a market (there are other order types outside the scope of this article): the market order and the limit order. The market order (buying or selling "at market") will execute the transaction at the best available bid or ask in the orderbook and will fill the order immediately. In contrast, the limit order "rests" in the market, and tells the exchange to execute the order "at this price or better". Limit orders are not necessarily executed, and highly dependent on the direction of price movement and action of market participants.
Now that we understand the difference between a limit order and a market order, we can discuss how the orderbook is composed of bids and asks. A bid is the maximum price that an investor is willing to pay for a security. Conversely, the ask is the minimum price a seller is willing to accept for the security. (Longer Investopedia definitions) So for example, let us say hypothetically that we want to BUY Bitcoin, but we do not want to pay more than $19,000. We would submit a limit order to the exchange for that $19,000 price and the amount of BTC that we want to purchase at that price. Someone else, who already owns BTC and hypothetically wants to sell, but does not want to sell for less than $19,050, will submit a limit order at that price and for their amount. The buy order will represent a bid in the orderbook, and the sell order will represent an ask in the orderbook. The difference between the bid and the ask is referred to as the "spread", and in this hypothetical is $50.
the orderbook is quite simply a list of willing buyers and sellers and the price(s) at which they are willing to conduct a trade
So in summary, the orderbook is a list of all of the limit buy orders stacked in price from highest to lowest (example, $19,000; $18,998; $18,990.. and so on) and the limit sell orders ordered from lowest to highest (example, $19,050; $19,051; $19,065 and so on..). If everyone simply listed the prices they were willing to buy and sell at, how do trades actually get executed? ... Market orders! We will discuss how a market functions using the orderbook in an upcoming article.