MiniCTRM - Build Tutorial 732: An exchange trade feed: trades that arrive by themselves, through the one door
→ to begin · N for the speaker notes
On a phone: Next or a swipe left to begin, Notes for the words.
What you'll learn
Mapping tables for products, accounts and ids; an inbox where every arrival lands as received before anything is booked; an adapter behind one interface with a file-based first implementation and the exchange's protocol later; idempotency on the external id so a trade never books twice; reconciliation against the clearing statement; and a parallel run before cutover.
What MiniCTRM's feed is, and is not
What you need first – The three lessons this one specializes, the deal type the feed books, and where a from-scratch build takes it.
The mapping layer is the work – Four maps and a deal reference, why none names a protocol field, what an unmapped trade does, idempotency and the door; then the tables themselves.
Every arrival lands, then books through the door – The inbox with six statuses and the booking under FEED as the feed's user; one adapter interface with the clearing broker's file first and the exchange's protocol as a stub.
Reconcile, run in parallel, write the rules – Positions against the clearing statement with breaks that fail closed; a shadow book beside the desk until the breaks are zero; the kill switch; CLAUDE.md.
Ship it – /ship, with the feed's tests among the rest.
How MiniCTRM did it – The ICE Trade Feed and its mappings, the Message Log, and Import from CSV: the other door another system's deals book through.
Copyright 2026-2027 Brian Shydlo. MiniCTRM is source-available under the PolyForm Strict License 1.0.0 (https://polyformproject.org/licenses/strict/1.0.0): free for learning and other noncommercial use; no changes and no redistribution; commercial use needs permission.
Welcome
Trades that arrive by themselves
1 / 14What MiniCTRM's feed is, and is not
What MiniCTRM's feed is, and is not
2 / 14What you need first
What you need first
3 / 14The mapping layer is the work
Four maps, one reference, three rules
4 / 14The mapping layer is the work
Mapping tables
5 / 14Every arrival lands, then books through the door
The inbox and the one door
6 / 14Every arrival lands, then books through the door
An adapter behind one interface, file-based first
7 / 14Reconcile, run in parallel, write the rules
Reconciliation against the clearing statement
8 / 14Reconcile, run in parallel, write the rules
The parallel run and the rules
9 / 14Ship it
Ship it
10 / 14How MiniCTRM did it
The ICE Trade Feed and its mappings
11 / 14How MiniCTRM did it
The Message Log
12 / 14How MiniCTRM did it
Import from CSV: the other door another system's deals book through
13 / 14What you have now
What you have now
14 / 14
You have finished lesson 732, An exchange trade feed: trades that arrive by themselves, through the one door.