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 quantity | Buy price | Sell price | Sell quantity |
|---|---|---|---|
| 200 | 99.50 MAD | 100.00 MAD | 150 |
| 500 | 99.00 MAD | 100.50 MAD | 300 |
| 1,000 | 98.50 MAD | 101.00 MAD | 400 |
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
| Order | What it does | The trade-off |
|---|---|---|
| Limit | Sets a maximum buying price or a minimum selling price. | The price is controlled, but the order may not be filled. |
| Market | Takes the best prices available. | Execution is more likely, but the price is not known in advance. |
| Stop | Becomes 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.
