Order Book in Trading & How Prices Change?

order book in trading
xlearnonline.com

The common belief among many individuals is that the news or events are the driving force behind price movements, when in reality why do prices change? Well, it is the orders placed by people in the market that cause prices to fluctuate.

To understand how prices change, you need to get a handle on these elements:

  • ORDER BOOK / LEVEL II
  • TIME AND SALES

What is an Order Book in Trading?

The “book” or “level 2” refers to a real-time display of the orders to buy and sell securities at various prices, known as the order book.

The order book provides transparency into the supply and demand for a particular security, showing the limit orders that buyers and sellers have placed at various prices.

Put simply, the book is a mechanism employed by the exchange to incorporate people’s orders into the market and attempt to match them with one another for execution.

These pictures show examples of crypto and stock level II’s

crypto and stock order book
xlearnonline.com
Interactive brokers Level II
xlearnonline.com

Before observing how the matching system adds orders to the book, let’s first study the time and price priority of the matching algorithm.

Time and Price Priority of the Order Book

Order book time and price priority refer to the rules governing the execution of orders in a financial market. When multiple orders for the same security are present in the order book, the system first considers the price of each order, with the highest buy price and lowest sell price receiving priority.

If multiple orders have the same price, then the system considers the time at which each order was placed, with earlier orders receiving priority over later ones. This is known as time priority.

For example, let’s say there are two buy orders for the stock in the order book: Order A placed at 9:45 am with a limit price of $50, and Order B placed at 10:00 am with a limit price of $52. In this scenario, Order B will receive priority over Order A, as it was placed at a higher price.

In another scenario, let’s say there are two sell orders for the same stock in the order book: Order C placed at 10:00 am with a limit price of $55, and Order D placed at 11:00 am with a limit price of $55. In this scenario, Order C will receive priority over Order D, as it was placed earlier at the same price.

Therefore, price priority and time priority are important factors that determine the order in which orders are executed in a financial market.

Limit orders are the only orders displayed on the books, as market orders are executed instantly upon submission.

To understand how this works we need to simplify this order book. so let’s create our version as an example.

Suppose there are 11 individuals involved in our small-scale stock market and they all want to trade the same stock.

For the sake of reference, let’s label them as participants A to K.

  • “A” wants to buy 3000 shares at $41
  • “B” wants to buy 5000 shares at $39
  • “C” wants to sell 5000 shares at $55

Now let’s add these orders to our orderbook using the same algorithm.

BUYERSSELLERS
A 3000@$41C 5000@$55
B 5000@$39

We have buyers on the left, and sellers on the right.

The reason for “A” being on top of “B” is that “A” is willing to pay a higher price per share than “B”. only one order on the seller’s side so “C” ‘s order is the first so it’s on top.

What is Level I?

level 1 ctrader
xlearnonline.com

Level 1 is a term used to describe the first level of a financial instrument’s market data. It provides real-time pricing information on a particular security, such as stocks, bonds, or derivatives.

Level 1 data includes the current bid and ask prices, the last traded price, trading volume, and other basic market data, It’s derived from LEVEL II or Book data.

In the example given, the highest price at which someone is willing to buy a stock is $41, while the lowest price at which someone is willing to sell is $55.

Therefore, the most competitive buying price, also known as the “best bid,” is $41, and the most competitive selling price, also known as the “best ask,” is $55.

BIDASK
3000@$415000@$55

Whenever a new order is received, the book gets updated and as a result, the “Level I” also gets updated to reflect the changes in the best bid and ask.

Now let’s add some more orders.

  • “D” wants to sell 5000 shares at $59
  • “E” wants to sell 2000 shares at $52
  • “F” wants to buy 1000 shares at $50
BUYERSSELLERS
F 1000@$50E 2000@$52
A 3000@$41C 5000@$55
B 5000@$39D 5000@$59

“A” was topped by “F”, while “E” ranked higher than both “C” and “D”.

So the best Bid and Ask now is 50 and 52, so the level I changed as follows.

BIDASK
1000@$502000@$52
  • “G” wants to buy 2000 shares at $48
  • “H” wants to sell 1000 shares at $51
  • “I” wants to buy 5000 shares at $46
BUYERSSELLERS
F 1000@$50H 1000@$51
G 2000@$48E 2000@$52
I 5000@$46C 5000@$55
A 3000@$41D 5000@$59
B 5000@$39

As of now, there have been no orders filled yet.

I believe you are starting to comprehend how orders are prioritized in the book.

Our best bid is still 50 but our ask changed. So level I changes.

BIDASK
1000@$501000@$51

Now to the fun part,

  • “J” wants to sell 5000 shares at the market

Remember Market Order?

Recall that among the different order types, market orders prioritize selling the shares over the price, as the seller is not concerned about the specific price.

Once his order enters the book, there are already existing buy orders, and thus his order is executed first before being added to the book.

Participant “F” has an open order for 1000 shares for $50, and thus participant “J” is executed first along with “F”.

So our first trade/fill happened at last. we need to update this information to something called Time and sales

What is Time and Sales?

time and sales of a stock IBKR
xlearnonline.com

The time and sales (T&S) is a record of every trade executed on a particular exchange or market.

It includes information such as the time of the trade, the price at which it was executed, and the size of the trade.

The current price of a stock can be determined by looking at the last executed order price in the time and sales record.

It’s also called the last price. it’s one of the elements in the level I

Now, “J” still needs to sell 4000 shares more,

Therefore, the algorithm will attempt to pair his order with the next available bid, which is “G”. After “G”s order is filled, there are still 2000 shares remaining to be sold. so again it will look for the next available bid.

So the next one is “I” but his order is for 5000 shares, which exceeds the available shares to sell by “J”.

As a result, I’s order is partially filled with “J”s order, and the remaining of “I”s order is added to the level 2 order book, which is displayed below.

BUYERSSELLERS
I 3000@$46H 1000@$51
A 3000@$41E 2000@$52
B 5000@$39C 5000@$55
D 5000@$59

BIDASK
3000@$461000@$51

One more update to the order book

  • “K” wants to buy 5000 shares at $53

Participant “H” is selling 1000 shares for $51, and Participant “E” is selling 2000 shares for $52.

As a result, participant “K”s order is partially filled and the remaining portion of the order is added to the buy side of Level II data. as follows:

BUYERSSELLERS
K 2000@$53C 5000@$55
I 3000@$46D 5000@$59
A 3000@$41
B 5000@$39
level II
BIDASK
2000@$535000@$55
level I

Now, The best bid was $46 before now it’s $53. why?

Did the price change due to a news release or because the company is performing well? No. What caused the price to shift?

The price moved because a buyer placed an order to buy. and the reason behind the order can be anything. However, it was the act of the buyer’s order that caused the price to change.

So at the end of the day, it’s basic supply and demand. shown through the order book on the exchange. and the price is only going to fluctuate based on solely the order people sent.

Occasionally, you may hear people say that a company’s stock price crashed despite positive news. Why does this happen?

It’s because maybe somebody sent a big order to sell at the news and there were not enough buyers to buy from him so he pushed the price down by selling to lower and lower prices.

Again, It’s SUPPLY & DEMAND

Interactive brokers provide their clients with the best trading tools. and LEVEL II is one of them.

Terminologies

BID = maximum price that a buyer is willing to pay

ASK = minimum price that a seller is willing to take

If you wish to purchase immediately, you may do so at the best ask price, while if you wish to sell immediately, you can sell at the best bid price.

Don’t get confused with this, read a couple of times again and try to imagine the LEVEL II’s workflow in your mind, it will come through, and once you start executing orders this will become simpler.

SPREAD = is the difference between the bid and ask.

Shopping Cart
Scroll to Top