An Order Book is a record of all the orders placed by traders (also called market makers) at their preferred prices to buy or sell an asset.
Market Makers on an exchange are traders who don't trade at the current market price and are willing to wait and pay a fixed price for an asset. The various orders (price & quantity) specified by these market makers constitute the order book.
Market Takers on the other hand are traders who want to trade right away at the current market price.
Alice and Bongani use the VALR exchange to trade ZAR for BTC
We're going to use two fictional people as an example, Alice and Bongani.
Let's pretend that the VALR orderbook currently looks like this:
Alice has ZAR 100,000 to spend and would like to buy some BTC. The minimum amount of bitcoin Alice wants to buy is 1 BTC, which means she would need to trade at a price of ZAR 100,000 = 1 BTC to get what she wants. Alice is willing to wait for the market price of BTC to change and thinks there is a chance that the price of BTC will arrive at ZAR 100,000 = 1 BTC in the future, so she places an order to buy 1 BTC for ZAR 100,000 on the VALR orderbook. The current market price of BTC is higher than ZAR 100,000 so this trade won't happen right away because there are other people who are willing to accept less than 1 BTC for ZAR 100,000.
Some time passes and the price of BTC moves down to close to ZAR 100,000 = 1 BTC. Bongani has BTC and he wants to trade his BTC for ZAR right away. He likes the price that Alice is offering to buy BTC from him, so he accepts the trade and matches Alice to swap ZAR 100,000 for 1 BTC. Bongani becomes the taker of the trade because he wants to trade now and matches Alice to make sure his trade happens right away.
VALR then uses technology to match Alice and Bongani and they swap ZAR and BTC at the price they have agree on.
The order book you see on the VALR Exchange is a set of offers that people like Alice (called "makers") have submitted to buy or sell cryptocurrency.
When a Bongani comes onto the exchange and wants to accept an offer by an Alice, a trade will take place at the best available price for Bongani. The Bongani in this particular trade becomes the "taker" of the already existing orders by Alice and pays a fee to VALR to complete the trade.
If a new trader has selected the option to "post only", then any new order that would match an existing order is immediately cancelled. Traders use this option to avoid becoming takers and paying taker fees on the VALR exchange.
If multiple orders for the same price exist, these are prioritised on a first come, first served basis (earliest order is filled first). This process is repeated until no more trades are possible.
An order that has not matched can be stopped at any time, at which point in time it is removed from the order book.
An order may end up in one of three states:
- Unfilled: the order was unable to be matched at all by the time it was stopped.
- Partially-filled: a portion of the total volume of crypto was matched between buyer and seller before it was stopped.
- Filled: the order is completed for the total volume of crypto purchased or sold.
- A maker creates a new order that no one else on the order book would immediately accept to trade (they are willing to wait to trade)
- A taker creates a new order that matches an order that already exists on the order book, which completes a trade (they want to trade right away)
- The taker pays the fee to complete the transaction while makers are paid to trade on VALR
- Order's can be posted in post-only mode to avoid fees
- Orders can be cancelled at any time before the trade is completed