Orders

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.

A simulated order on the ticket: with no market grant it is refused and the grant is offered; once granted, the order is recorded and filled, badged sim.
Recorded in the workbench: a simulated order refused with no market grant, then recorded and filled once granted.

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.

How an order is placedA principal's ticket is checked, first against the order model and the venue's rules, then against the standing market grant's venues, symbols and bounds. A refused ticket records and sends nothing. An admitted ticket is written into the market file as an order record with its principal and grant, then sent once to the venue. A sim order is matched against the file's own recorded book. What became of it is appended as an order-update or a fill.The ticketsymbol · side · qty ·type · venueCheckedthe model, thevenue's rules, thegrant's boundsorder recordby: the principal ·grantSent oncesim, paper or liveorder-update ·fillwhat became of itHow an order is placedA principal's ticket is checked, first against the order model and the venue's rules, then against the standing market grant's venues, symbols and bounds. A refused ticket records and sends nothing. An admitted ticket is written into the market file as an order record with its principal and grant, then sent once to the venue. A sim order is matched against the file's own recorded book. What became of it is appended as an order-update or a fill.The ticketsymbol · side · qty · type · venueCheckedthe model, the venue's rules, the grant's boundsorder recordby: the principal · grantSent oncesim, paper or liveorder-update · fillwhat became of it

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
ProvenanceFile 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.

the order record the model writes (orders.js orderRecord)simulated · the study's own ids · 2026-11-04
{ "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
ProvenanceFile 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.