Delayed
prices
Guides

The order book and order types, explained step by step

Behind every price, there are buyers and sellers waiting. Here is how to read the order book and what each type of order does.

Editorial team BoursimpleUpdated 2 min read
Trading app on a smartphone and a computer
Trading app on a smartphone and a computer · Illustrative photo : Unsplash

In short

  • The order book lists waiting buy and sell orders.
  • A trade happens when a buying price and a selling price meet.
  • Each order type is a trade-off between price and certainty of execution.

Reading an order book

Here is a made-up order book:

Buy quantityBuy priceSell priceSell quantity
20099.50 MAD100.00 MAD150
50099.00 MAD100.50 MAD300
1,00098.50 MAD101.00 MAD400

The best buyer offers 99.50 MAD and the best seller asks 100 MAD. This gap of 0.50 MAD is called the spread. As long as neither moves, there is no trade at these prices.

The main order types

OrderWhat it doesThe trade-off
LimitSets a maximum buying price or a minimum selling price.The price is controlled, but the order may not be filled.
MarketTakes the best prices available.Execution is more likely, but the price is not known in advance.
StopBecomes active when a price level is reached.The final price can differ from that level.

Order types and how long they stay valid can vary by platform.

Example: a market order

With the book above, a market order to buy 300 shares takes 150 shares at 100 MAD, then 150 at 100.50 MAD. The cost is 30,075 MAD, an average price of 100.25 MAD. On a rarely traded stock, this gap can be much bigger.

Priority and partial execution

  • Price priority: the best price goes first.
  • Then time: at the same price, the first order entered goes before the others.
  • Partial execution: an order for 500 shares may be filled for only 200 if there are not enough shares on the other side.

Each trade can involve fees: see our guide to trading fees.

Frequently asked questions

Does my order appear on the market immediately?

It goes through your brokerage firm and then the trading system, during session hours. An order entered outside a session waits for the opening.

Can I cancel an order?

Usually yes, for the part not yet filled. The terms depend on your platform.

This article is for information and educational purposes only. It is not investment advice or a recommendation to buy or sell any security. Investing in shares involves a risk of capital loss. Check figures against official sources (Casablanca Stock Exchange, AMMC) and consult a licensed professional. Read the full disclaimer.