Seven components, one path
Gateway, checks, sequencer, engine, market data, post-trade, audit trail: what each does to an order.
Lesson 18 min
By the end of this lesson
- Name the seven components of a trading venue in the order an order follows
- Calculate the amount paid for an order filled at two price levels
- Place the checks described by the BVMAC in the brokerage firm’s aggregator
In this lesson5
A matching engine is the heart: it matches orders. But a trading venue is the whole body. Before the engine you need a door and a check; after it you need to inform the market, settle the trades and keep a record of everything. What you will learn here: name the seven components of a trading venue and say what each one does to an order.
What we know about the BVMAC system
The BVMAC currently trades on a system called NSC V900. In a tender of May 2025 it describes the path of an order: the aggregator installed at the brokerage firm "checks the required parameters (amount, cap, price, quantity, etc.)", the order goes through an API to the trading system, then the result goes to the central depository and back to the brokerage firm (tender no. 023/16/BVMAC/DD/05-25). The same document mentions the splitting of shares, which "should cause a massive increase in the number of orders", and future continuous trading.
The internal architecture of the NSC V900 is not public. Everything below about the split into components is a design choice, supported by public texts from other markets where they exist. Nothing says the BVMAC is organised this way.
The seven components
1/71. Access gateway
Receives messages from brokerage firms, authenticates the session, checks the numbering, translates the external format (FIX, binary, API) into the internal one.
Trading venue
All the components that receive, check, number, match, publish, forward and archive a market's orders. The matching engine is only one of them.
The European delegated regulation on trading venues splits the system the same way to measure its capacity: upstream connectivity and gateways, engine, downstream connectivity and data feeds, monitoring (Delegated Regulation (EU) 2017/584, art. 11). It is a European example, with no force in CEMAC, but it is the most precise public text found on the subject.
Without looking above: which component decides the order in which two messages are processed?
One order, end to end
The animation follows a buy of 40 shares at 10,100 at most. The executions, the remaining book and the published messages are computed by the portal's @criee/marche engine.
- 1Gateway
- 2Risk checks
- 3Sequencer
- 4Engine
- 5Market data
- 6Post-trade
- 7Audit trail
logon OK · session 7 · msg 42
The gateway receives the message
What each component does to Mariam's orderFictional
Starting book: sells of 20 shares at 10,050 and 30 shares at 10,100; a buy of 25 shares at 9,950. Reference price: 10,000.
- Gateway: the session is open; the message is the 42nd of the session.
- Checks: ±10% collar around 10,000, i.e. 9,000 to 11,000; 10,100 is inside. Maximum value of the order: 40 × 10,100 = 404,000 XAF.
- Sequencer: number 1087.
- Engine: 20 shares at 10,050 then 20 shares at 10,100; 20 × 10,050 + 20 × 10,100 = 201,000 + 202,000 = 403,000 XAF.
- Market data: two execution messages; the best offer becomes 10 shares at 10,100.
- Post-trade: +40 shares and −403,000 XAF to settle for Mariam.
- Audit trail: one line for receipt, one for the check, one for each execution.
The order reserved 404,000 XAF; it costs 403,000, because the first sell was cheaper than her limit.
Why split
Each component has a reason to exist on its own:
- The gateway multiplies: one per group of members, to spread the load and isolate a failure.
- The checks change often (new collars, new caps); the engine rarely does.
- The sequencer must be unique, otherwise two queues would give two truths.
- The engine must be simple and deterministic so it can be tested and replayed.
- Market data serves hundreds of screens; it must never slow the engine down.
This split is not a rule: a small market can put gateway and checks in the same program. What matters is knowing which responsibility lives where.
Why must the sequencer be unique when there can be several gateways?
The contract in TypeScript
In code, each component is a function or object with typed inputs and outputs. With the portal's engine:
import { Carnet, type Execution, type Ordre } from '@criee/marche'
type Entree = { seq: number; ordre: Omit<Ordre, 'rang'> }
function traiter(carnet: Carnet, e: Entree): Execution[] {
// The engine reads neither the clock nor the network: only the numbered input.
return carnet.passer(e.ordre)
}
The developer track covers the order model and the book in detail (Modelling an order, Continuous trading, line by line). The next lessons of this section take the other components one by one.
Your turn
Read next: BVMAC, appel d’offres n°023/16/BVMAC/DD/05-25, API de transmission des ordres (2025)
A question? Ask your teacher, or an AI assistant, giving it the title of this lesson.