MiniCTRMSearch

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.

Before you start

The lessons this one builds on: 623 Integrations: CSV in and out, feed adapters and the API, 632 Robustness: transactions, one door per write, validation, retries, the activity log, 633 Security: sign-in, privileges on every endpoint, audit, secrets.

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 / 14
Trades that arrive by themselves
What MiniCTRM's feed is, and is not

What MiniCTRM's feed is, and is not

2 / 14
What MiniCTRM's feed is, and is not
What you need first

What you need first

3 / 14
What you need first
The mapping layer is the work

Four maps, one reference, three rules

4 / 14
Four maps, one reference, three rules
The mapping layer is the work

Mapping tables

5 / 14
Mapping tables
Every arrival lands, then books through the door

The inbox and the one door

6 / 14
The inbox and the one door
Every arrival lands, then books through the door

An adapter behind one interface, file-based first

7 / 14
An adapter behind one interface, file-based first
Reconcile, run in parallel, write the rules

Reconciliation against the clearing statement

8 / 14
Reconciliation against the clearing statement
Reconcile, run in parallel, write the rules

The parallel run and the rules

9 / 14
The parallel run and the rules
Ship it

Ship it

10 / 14
Ship it
How MiniCTRM did it

The ICE Trade Feed and its mappings

11 / 14
The ICE Trade Feed and its mappings
How MiniCTRM did it

The Message Log

12 / 14
The Message Log
How MiniCTRM did it

Import from CSV: the other door another system's deals book through

13 / 14
Import from CSV: the other door another system's deals book through
What you have now

What you have now

14 / 14
What you have now

You have finished lesson 732, An exchange trade feed: trades that arrive by themselves, through the one door.

Where next?

← → move · N notes · Home / End