Every order, with who placed it.
An order is an act under a standing market grant. It is written into the market file with its principal and its grant before it is sent, and what became of it is the next record. Nothing is retried on its own.

Record, then send
The record comes first.
A ticket is checked against the venue's rules and the grant's bounds. Only then is it written into the file, and only then is it sent. A reply is not a fill: what became of the order is a record of its own.
Five tickets
Two fills, one expiry, two refusals.
The study put five tickets through the order model against the example file's recorded book. No venue was called: a sim order is matched once against the prices the file recorded, and never rests. The example's data is synthetic.
Simulated
- buy 10 NRTH at market: filled at the best ask
- 189.72
- sell 10 NRTH at market: filled at the best bid
- 189.64
- buy 100 KELP, limit 40: the best ask was 47.4, and a sim order does not rest
- Expired
- a sim order good till cancelled: "sim takes time in force ioc, not gtc"
- Refused
- a venue called just "paper": no such venue
- Refused
cloud://global/examples/template-library/markets/terminal.market.tsxOutput case-studies/orders/stats.jsonTool packages/domain/world/orders.js (validateTicket, simFill), through scripts/sites/case-studies.mjs ordersRan on This computer (dell-gb10-1)When What the file receives first.
The record of the first ticket, before any fill. by is the principal that placed it and grant the standing grant it acted under; the study used placeholder ids for both. In a market file this is one <order … /> element after the last.
{ "kind": "order", "id": "o-case01", "sym": "NRTH", "side": "buy", "qty": "10", "type": "market", "tif": "ioc",
"venue": "sim", "mode": "sim", "by": "agent:case-studies", "grant": "g-case01" }CommandAGI's own account
No account connected yet.
CommandAGI has connected no paper or live account, so it holds no position and none of its orders can reach a venue yet. When one is connected, each order is on the record the same way.
- positions held
- 0
- of 12 venues connected; sim is the one available
- 0
GET /v1/trading/venues, GET /v1/positions (production)Output case-studies/orders/stats.jsonTool scripts/sites/case-studies.mjs ordersRan on This computer (dell-gb10-1), as user-commandagiWhen Grant an agent its bounds.
Name the venues, the symbols and the limits; the agent trades within them, and every order says who placed it.