Training Guide¶
Welcome to the EduMatcher self-study training programme. This hands-on guide takes you from a cold start to confidently operating every major feature of the exchange, one exercise at a time, with a checkpoint after each step.
| Who it is for | Students, self-learners and classes who learn best by doing |
| What it assumes | Basic command-line and YAML skills. No finance background is needed |
| How it relates to the other books | Each chapter links to the Participant Guide, Operator's Guide or Protocols and Clients for the explanation, and to the Reference Manual for details — the exercises do not repeat them |
If you are new to finance, first read How an Exchange Works, a non-technical introduction to what an exchange does. If you have not run EduMatcher at all yet, the Quick Start Guide is the gentler first hour; this guide then goes deeper.
How to use this guide¶
The 29 chapters (00–28) form one sequence. Each chapter's Prerequisites section names what it needs, and for almost every chapter that is everything before it: later exercises reuse the configuration, the processes and the orders that earlier ones set up. Work through the chapters in order and stop when you have covered what you need — Choose your path below shows where. Three chapters can be taken early:
- 18 — Exchange Observer Processes needs only chapters 00–03. Taking it straight after chapter 03 gives you the viewers and monitors for every later chapter.
- 25 — Market Index needs only chapters 00–03 (plus
pm-statsfrom chapter 15 for Exercise 9). - 28 — IPO Valuation needs only chapter 00 for its first six exercises; the last also needs 00–03 and 07.
What you need¶
- EduMatcher installed. Any of the routes in the Operator's Guide Installation chapter works; chapter 00 walks through them and helps you pick.
- Several terminals. The exchange is a set of processes, and this guide
asks you to watch them side by side. A multiplexer (
tmux,screen) or split panes helps, but separate windows are fine.
The two consoles¶
This is the one thing worth knowing before chapter 00, because mixing them up is the most common early mistake:
pm-alf-console |
pm-admin |
|
|---|---|---|
| You are | a trader | the exchange operator |
| Prompt shown in this guide | [TRADER01]> |
[GW_ADMIN\|ADMIN]> |
| Typical commands | NEW, AMEND, CANCEL, STATUS, ORDERS, POS, QUOTE, QLEGS |
BOOK, HALT_SYM, CANCEL_SYM, KILL\|GW=, SESSION\|STATE=, GATEWAYS |
| Can see the whole order book | No | Yes |
A prompt containing |ADMIN]> always means the pm-admin terminal. Anything
else is a trader console. Commands are not interchangeable between them —
a BOOK typed into a trader console just answers Unknown command.
The configuration you build in chapter 01 calls the operator GW_ADMIN. The
integration chapters 22–27 each generate a fresh configuration whose operator
is OPS01, the same name the bundled example configurations and the Quick
Start use. The role, ADMIN, is what matters.
Keeping the market open¶
Your configuration has sessions enabled, so the engine starts every run in
CLOSED and rejects orders until the trading day is opened. Chapter 01 shows
how to open it by hand from the operator console — SESSION|STATE=PRE_OPEN,
then SESSION|STATE=CONTINUOUS — and the exercises assume you do this after
every engine restart. If an order comes back REJECTED … code=MARKET_CLOSED,
this is why.
Conventions¶
[TRADER01]>— type this at that trader console's prompt.[GW_ADMIN|ADMIN]>— type this at the operator console's prompt.- A plain
$or a bare command — type this in a normal shell. [output]— expected output; exact wording may vary between versions.- — a checkpoint. Verify it before moving on; if it fails, the next exercise will not behave as described.
Choose your path¶
flowchart LR
Start(["Why are you\nhere?"]) --> Trader["Learn to trade"]
Start --> Operator["Run or operate a\nclassroom exchange"]
Start --> Everything["Cover it all,\nincluding external\nprotocols"]
Trader --> T1["Parts I–II\nchapters 00 → 08"]
T1 --> TDone(["Placing, amending,\ncancelling orders;\nauctions and TIFs"])
Operator --> O1["Parts I–IV\nchapters 00 → 19"]
O1 --> ODone(["Liquidity, risk\ncontrols, P&L, a full\nsession, admin tools"])
Everything --> E1["Parts I–V\nchapters 00 → 28"]
E1 --> EDone(["Everything above, plus\nALF, BALF, CALF, RALF,\nREST/WebSocket, the index\nand IPO valuation"])
style Start fill:#4a5568,stroke:#2d3748,color:#fff
style TDone fill:#2f855a,stroke:#276749,color:#fff
style ODone fill:#2f855a,stroke:#276749,color:#fff
style EDone fill:#2f855a,stroke:#276749,color:#fff
| Your goal | Work through | What you'll have |
|---|---|---|
| Learn to trade — place, amend, and cancel orders; understand fills, TIFs, order types, and auctions | Parts I–II (00–08) | Everything a working trader needs day to day |
| Run or operate a classroom exchange — liquidity, risk controls, P&L, a full session, admin tools | Parts I–IV (00–19) | Everything above, plus the operator's toolkit |
| Cover everything, including external protocols | Parts I–V (00–28) | The full training programme |
Training plan¶
The five parts follow the chapter numbers, so reading the book front to back is reading the chapters in order.
Part I — Foundations¶
| # | Chapter | You will be able to | Background reading |
|---|---|---|---|
| 00 | Installation & Setup | Install EduMatcher and know where its files live | Installation, Quick Start Guide |
| 01 | Configuring & Starting Up | Author, verify, deploy a configuration; start the engine, scheduler and both consoles | The Configuration Workflow, Config Verifier, Running the Exchange |
| 02 | Setting Up Market-Maker Liquidity | Seed a two-sided book so there is something to trade against | Market Making, Market-Maker Bot |
| 03 | The First Trade | Submit orders, read fills, follow an order's lifecycle | ALF Console, Order Types |
Part II — Trading mechanics¶
| # | Chapter | You will be able to | Background reading |
|---|---|---|---|
| 04 | Amending Orders | Change price and quantity, and predict the effect on queue priority | Order Amendment |
| 05 | Order Types Deep Dive | Use MARKET, STOP, STOP_LIMIT, FOK, IOC, ICEBERG and TRAILING_STOP | Order Types |
| 06 | Time-in-Force & Sessions | Choose a TIF and predict how each session phase treats it | Auctions & Scheduling |
| 07 | Auctions | Run an auction and compute the equilibrium price by hand | Auctions & Scheduling — Equilibrium price |
| 08 | Cancelling & Managing Orders | Inspect and cancel resting orders; use the operator's bulk-cancel tools | ALF Console, The Admin Console and Exchange Commands |
Part III — Liquidity, risk and results¶
| # | Chapter | You will be able to | Background reading |
|---|---|---|---|
| 09 | Market Making | Run a two-sided quote by hand and inspect its legs | Market Making |
| 10 | Combo Orders | Submit multi-leg and OCO orders, and reason about leg risk | Combo Orders |
| 11 | Risk Controls | Configure and trigger collars, circuit breakers, halts and the kill switch | Risk Controls |
| 12 | P&L & Clearing | Read positions, VWAP cost and realized/unrealized P&L | Positions and P&L |
| 13 | Market Data & Drop Copy | Explain the market-data and drop-copy feeds and watch them | Drop Copy, DC Gateway |
| 14 | AI Traders & News | Run an AI market with a hidden true value and move it with news | AI Traders |
Part IV — Running a full session¶
| # | Chapter | You will be able to | Background reading |
|---|---|---|---|
| 15 | Statistics & Reporting | Query OHLCV, trades and snapshots for analysis | Statistics and Reporting |
| 16 | Persistence & Recovery | Say what survives a restart, and verify it | Persistence, Audit Trail |
| 17 | Capstone Scenario | Run a full session end to end, combining everything above | Running the Exchange |
| 18 | Exchange Observer Processes | Compare the book, tape, order monitor, audit trail, stats and clearing views side by side | Processes, Environment and Ports |
| 19 | Advanced Admin Operations | Use KICK, QCANCEL, CANCEL_SYM and manual session overrides |
The Admin Console and Exchange Commands |
Part V — Integration and advanced topics¶
Chapters 20, 22–24, 26 and 27 connect other software to the exchange over its wire protocols and APIs; 21 automates the operator, 25 adds a market index and 28 prices an IPO.
| # | Chapter | You will be able to | Background reading |
|---|---|---|---|
| 20 | Drop-Copy Replay & Recovery | Detect sequence gaps and recover a consumer | Drop Copy — Replay |
| 21 | Automation & MM Bot Tuning | Script operator workflows and tune pm-mm-bot |
The Admin Console and Exchange Commands, Market-Maker Bot |
| 22 | RALF Post-Trade Protocol | Write a clearing, drop-copy or audit consumer | RALF Gateway, RALF Protocol |
| 23 | CALF Market-Data Protocol | Write a market-data consumer with snapshots and replay | CALF Gateway, CALF Protocol |
| 24 | API Gateway REST/WebSocket | Trade and query over REST, and stream over WebSocket | API Gateway, REST API Reference |
| 25 | Market Index (pm-index) |
Run an index and apply corporate actions without disturbing its level | Market Index, Index Administration (pm-index-admin-cli) |
| 26 | ALF TCP Gateway | Speak ALF over a raw socket | ALF Gateway, ALF Protocol |
| 27 | BALF TCP Gateway | Speak the binary order-entry protocol | BALF Gateway, BALF Protocol |
| 28 | IPO Valuation | Price an IPO, then list it and let the opening auction judge the price | IPO Valuation, Listing a New Symbol |
After the training¶
Use the Participant Guide, the Operator's Guide, the Reference Manual and the Glossary for day-to-day reference.